Skip to content

Commit bcf2912

Browse files
committed
chore(ci): switch to oidc and 2fa
1 parent e101396 commit bcf2912

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
release:
44
types: [published]
55

6+
permissions:
7+
id-token: write # Required for OIDC
8+
contents: read
9+
610
jobs:
711
publish:
812

@@ -14,6 +18,7 @@ jobs:
1418
- name: Use Node.js
1519
uses: actions/setup-node@v6
1620
with:
21+
node-version: '24'
1722
registry-url: 'https://registry.npmjs.org'
1823

1924
- name: Install dependencies
@@ -25,6 +30,13 @@ jobs:
2530
- name: Test
2631
run: npm test
2732

28-
- run: npm publish
29-
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33+
- uses: step-security/wait-for-secrets@v1
34+
id: wait-for-secrets
35+
with:
36+
secrets: |
37+
OTP:
38+
name: 'OTP to publish package'
39+
description: 'OTP from authenticator app'
40+
41+
- name: Publish
42+
run: npm publish --otp ${{ steps.wait-for-secrets.outputs.OTP }}

0 commit comments

Comments
 (0)