Skip to content

Commit 9ea0245

Browse files
Added Trusted publishing for npm
1 parent b4a575c commit 9ea0245

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
pull_request:
1111
branches: [main]
1212

13+
permissions:
14+
id-token: write # Required for OIDC
15+
contents: read
16+
1317
jobs:
1418
build:
1519
runs-on: ubuntu-latest
@@ -23,6 +27,7 @@ jobs:
2327
uses: actions/setup-node@v4
2428
with:
2529
node-version: "24"
30+
registry-url: "https://registry.npmjs.org"
2631

2732
- name: Cache node_modules
2833
uses: actions/cache@v4
@@ -62,8 +67,5 @@ jobs:
6267
echo "Publish a release version=$VERSION for tag $TAG_NAME"
6368
npm --no-git-tag-version --allow-same-version version $VERSION
6469
npm pack
65-
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
6670
npm publish react-assert-${VERSION}.tgz
6771
if: ${{ env.TAG_NAME != '' }}
68-
env:
69-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)