Skip to content

Commit

Permalink
Merge pull request #823 from g-ongenae/fixture/fix-dual-publish
Browse files Browse the repository at this point in the history
[CI] Fix token used during both publish
  • Loading branch information
g-ongenae authored Dec 6, 2023
2 parents 127ddf6 + 59995c0 commit 1f43a26
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,21 @@ jobs:
name: Run Lerna version
env:
GH_TOKEN: ${{ secrets.PUBLIC_REPO_GHA_PAT }}
- name: Setting NPM configs to publish to NPM
run: |
echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publishing to NPM
run: npx lerna publish from-git --yes --registry=https://registry.npmjs.org
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setting NPM configs to publish to GitHub Packages
run: |
echo "@algoan:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=\${NODE_AUTH_TOKEN}" >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.PUBLIC_REPO_GHA_PAT }}
- name: Publishing to GitHub Packages
run: npx lerna publish from-git --yes --registry=https://npm.pkg.github.com
env:
Expand Down

0 comments on commit 1f43a26

Please sign in to comment.