Skip to content

Commit e9a690f

Browse files
committed
ci: fix npm auth in publish workflows
1 parent 589c427 commit e9a690f

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/changesets.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ jobs:
2525
- name: Install dependencies
2626
run: bun install
2727

28+
- name: Setup npm auth
29+
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
30+
env:
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
32+
2833
- name: Build
2934
run: bun run build
3035

.github/workflows/snapshot-release.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,11 @@ jobs:
3030
- name: Unit tests
3131
run: bun run test:unit
3232

33-
- name: Setup npm auth
34-
run: |
35-
echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > .npmrc
36-
env:
37-
NODE_AUTH_TOKEN: ""
38-
3933
- name: Publish snapshot to npm
4034
run: |
35+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
4136
npx changeset version --snapshot canary
4237
npx changeset publish --tag canary --no-git-tag
4338
env:
44-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4540
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)