Skip to content

Commit fb3ebca

Browse files
authored
Enhance npm config and update auth token variable
Updated npm configuration to include 'always-auth' and changed environment variable name from NPM_TOKEN to NODE_AUTH_TOKEN.
1 parent 710c315 commit fb3ebca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,18 @@ jobs:
3838
run: bun run build
3939

4040
- name: Configure .npmrc
41-
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
41+
run: |
42+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
43+
echo "always-auth=true" >> ~/.npmrc
4244
4345
- name: Publish
4446
if: ${{ !inputs.dry-run }}
4547
run: bun publish --ignore-scripts --registry https://npm.pkg.github.com
4648
env:
47-
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4850

4951
- name: Publish (dry-run)
5052
if: ${{ inputs.dry-run }}
5153
run: bun publish --ignore-scripts --dry-run --registry https://npm.pkg.github.com
5254
env:
53-
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)