Skip to content

Commit

Permalink
ci(gha): fix token use during both publish
Browse files Browse the repository at this point in the history
  • Loading branch information
g-ongenae committed Dec 6, 2023
1 parent 127ddf6 commit 59995c0
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 59995c0

Please sign in to comment.