Skip to content

Commit

Permalink
chore: fix auth error in publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
guansss committed Dec 7, 2023
1 parent 5efe8d6 commit 08eb442
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- run: npm run setup
Expand All @@ -23,6 +24,7 @@ jobs:
- name: Publish to NPM
run: |
TAG=$(jq .version package.json | grep -oP '^"v?\d+\.\d+\.\d+-?\K(\w+)?')
echo "Publishing to npm with tag: ${TAG:-latest}"
npm publish --tag ${TAG:-latest}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: "npm"

- name: Cache core files
Expand Down

0 comments on commit 08eb442

Please sign in to comment.