Skip to content

Commit f8fee25

Browse files
committed
Update CI to use npm OIDC trusted publishing
npm classic tokens were revoked on Dec 2025. https://github.blog/changelog/2025-12-09-npm-classic-tokens-revoked-session-based-auth-and-cli-token-management-now-available/
1 parent e8bcdca commit f8fee25

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

.github/workflows/ci-deploy.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
1-
21
name: publish-package
32

43
on:
54
release:
65
types: [created]
6+
7+
permissions:
8+
contents: read
9+
id-token: write # Required for OIDC trusted publishing
10+
711
jobs:
812
build:
913
runs-on: ubuntu-latest
1014
steps:
11-
- uses: actions/checkout@v2
12-
# Setup .npmrc file to publish to npm
13-
- uses: actions/setup-node@v2
14-
with:
15-
node-version: '16.x'
16-
registry-url: 'https://registry.npmjs.org'
17-
scope: '@react-native-seoul'
18-
- run: yarn
19-
- run: yarn build
20-
- run: yarn publish
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
registry-url: 'https://registry.npmjs.org'
21+
scope: '@react-native-seoul'
22+
23+
- run: yarn install --frozen-lockfile
24+
25+
- run: yarn build
26+
27+
- name: Ensure npm CLI v11.5.1 or later (required for OIDC)
28+
run: npm install -g npm@latest
29+
30+
- name: Publish to npm with OIDC trusted publishing
31+
run: npm publish --access public --provenance

0 commit comments

Comments
 (0)