Skip to content

Commit 73b3075

Browse files
chore: prepare for version bump
1 parent f051aef commit 73b3075

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
tags:
8-
- 'v*' # optional: publish on version tags like v1.0.0
8+
- 'v*'
99

1010
jobs:
1111
publish:
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
1818

19-
- name: Setup Node.js 18
19+
- name: Setup Node.js
2020
uses: actions/setup-node@v4
2121
with:
2222
node-version: 18
@@ -33,13 +33,15 @@ jobs:
3333
- name: Build package
3434
run: pnpm build
3535

36-
# - name: Run tests (optional)
37-
# run: pnpm test
38-
3936
- name: Authenticate to npm
40-
run: npm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN}
4137
env:
38+
# Required so setup-node writes correct .npmrc
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4240
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: |
42+
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
4343
4444
- name: Publish to npm
45-
run: pnpm publish --access public --no-git-checks
45+
env:
46+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
run: pnpm publish --access public --no-git-checks

0 commit comments

Comments
 (0)