Skip to content

Commit 3fe45e9

Browse files
committed
chore: update npm publish workflow with OIDC support
1 parent c7d1d92 commit 3fe45e9

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
description: 'Minor'
1111
type: boolean
1212
default: false
13+
14+
permissions:
15+
id-token: write # Required for OIDC
16+
contents: read
17+
1318
jobs:
1419
publish_job:
1520
runs-on: ubuntu-latest
@@ -22,11 +27,9 @@ jobs:
2227
run: |
2328
git config --local user.email 'hello@rive.app'
2429
git config --local user.name ${{ github.actor }}
25-
- name: Authenticate with registry
26-
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
27-
- uses: actions/setup-node@v2
30+
- uses: actions/setup-node@v4
2831
with:
29-
node-version: '16.x'
32+
node-version: '24'
3033
registry-url: 'https://registry.npmjs.org'
3134
- name: Install Modules
3235
run: npm install
@@ -39,15 +42,9 @@ jobs:
3942
- if: ${{ inputs.major == true }}
4043
name: Major Release - Bump version number, update changelog, push and tag
4144
run: npm run release:major
42-
env:
43-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4445
- if: ${{inputs.major == false && inputs.minor == true}}
4546
name: Minor release - Bump version number, update changelog, push and tag
4647
run: npm run release:minor
47-
env:
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4948
- if: ${{inputs.major == false && inputs.minor == false}}
5049
name: Patch release - Bump version number, update changelog, push and tag
5150
run: npm run release:patch
52-
env:
53-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)