Skip to content

Commit 3b97ab4

Browse files
authored
Merge pull request #119 from Flux159/pr119
Updating deployment to use npm trusted publishers
2 parents 059082b + 4fd5360 commit 3b97ab4

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- v*
77

8+
permissions:
9+
id-token: write
10+
contents: write
11+
812
jobs:
913
deploy:
1014
runs-on: ubuntu-latest
@@ -59,10 +63,16 @@ jobs:
5963
git push origin main
6064
git push origin ${{ steps.version.outputs.current-version }}
6165
66+
- name: Setup Node.js for NPM publish
67+
uses: actions/setup-node@v4
68+
with:
69+
node-version: "20"
70+
registry-url: "https://registry.npmjs.org"
71+
72+
- name: Update npm for OIDC support
73+
run: npm install -g npm@latest
74+
6275
- name: Publish to NPM
63-
run: |
64-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
65-
echo "//registry.npmjs.org/:always-auth=true" >> ~/.npmrc
66-
npm publish
6776
env:
68-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
77+
NPM_CONFIG_PROVENANCE: true
78+
run: npm publish --provenance

0 commit comments

Comments
 (0)