Skip to content

Commit

Permalink
Configure NPM_AUTH_TOKEN on the node setup step
Browse files Browse the repository at this point in the history
  • Loading branch information
sarangard authored Mar 1, 2024
1 parent 65e420c commit f9e1bae
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- update-publish-workflow
workflow_dispatch: {}
jobs:
release:
Expand All @@ -20,9 +21,11 @@ jobs:
git config user.email "[email protected]"
- name: Check whether it's the latest commit
run: if [[ $(git ls-remote origin -h ${{ github.ref }} | cut -f1) != ${{ github.sha }} ]]; then exit 1; fi
- name: Setup Node.js
- name: Setup Node
uses: actions/[email protected]
with:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Install build dependencies
Expand All @@ -44,7 +47,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_REF: ${{ github.ref }}
- name: Setup NPM registry
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
# - name: Setup NPM registry
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
- name: Release to NPM
run: npm publish --access public
run: npm publish --access public

0 comments on commit f9e1bae

Please sign in to comment.