Skip to content

Commit f4cb1e7

Browse files
committed
Switch to Trusted Publishing.
1 parent 9266a54 commit f4cb1e7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/package.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@ jobs:
5858
- name: Set up Node.js
5959
uses: actions/setup-node@v4
6060
with:
61+
node-version: '20'
6162
registry-url: 'https://registry.npmjs.org'
63+
- name: Update npm
64+
run: npm install -g npm@latest
6265
- name: Download NPM package
6366
uses: actions/download-artifact@v4
6467
with:
6568
name: dist
6669
path: dist/
6770
- name: Publish package to NPM (dry run)
6871
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/develop') }}
69-
run: npm publish --access public $(find dist -name *.tgz -printf 'file:%p ') --dry-run
72+
run: npm publish $(find dist -name *.tgz -printf 'file:%p ') --tag latest --dry-run
7073
- name: Publish package to NPM
7174
if: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/heads/release') }}
72-
run: npm publish --access public $(find dist -name *.tgz -printf 'file:%p ')
73-
env:
74-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
75-
NPM_CONFIG_PROVENANCE: true
75+
run: npm publish $(find dist -name *.tgz -printf 'file:%p ') --tag latest
7676
release:
7777
needs: check
7878
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)