Skip to content

Commit

Permalink
ci: fix npm release install deps token
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidosmf committed Sep 14, 2023
1 parent 9c4f0a6 commit d63c8c4
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ jobs:
with:
cache: 'pnpm'
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'
registry-url: 'https://registry.npmjs.org'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}

- name: ⎔ Setup .npmrc (NPM)
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_TOKEN }}" >> ~/.npmrc

- name: 📥 Install dependencies
run: pnpm install --frozen-lockfile
env:
NODE_AUTH_TOKEN: ${{ secrets.GPR_TOKEN }}

- name: 🚀 Release to NPM
uses: changesets/action@v1
Expand All @@ -104,13 +104,11 @@ jobs:
version: pnpm release:version
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.NPMJS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GPR_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_TOKEN }}

- name: ⎔ Delete .npmrc (NPM)
run: |
rm -rf ~/.npmrc
rm -rf .npmrc
- name: Remove existing NPM .npmrc
run: rm -f "$HOME/.npmrc"

- name: ⎔ Setup Node.js ${{ matrix.node-version }} for Github Packages
uses: actions/setup-node@v3
Expand All @@ -122,7 +120,7 @@ jobs:
- name: 📥 Install dependencies
run: pnpm install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GPR_TOKEN }}

- name: 🚀 Release to Github Packages
uses: changesets/action@v1
Expand All @@ -132,6 +130,6 @@ jobs:
publish: pnpm release:publish
version: pnpm release:version
env:
GITHUB_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets. NPM_TOKEN }}

0 comments on commit d63c8c4

Please sign in to comment.