Skip to content

Commit 4c09f9b

Browse files
committed
chore: use npm trusted publishing (#2614)
1 parent 5fbd103 commit 4c09f9b

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
needs: check_branch
3535
permissions:
3636
contents: write
37+
id-token: write
3738

3839
if: ${{ github.repository_owner == 'visgl' && needs.check_branch.outputs.should_build }}
3940

4041
env:
4142
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
4343

4444
steps:
4545
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -48,7 +48,11 @@ jobs:
4848
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
4949
with:
5050
node-version-file: '.nvmrc'
51-
cache: 'yarn'
51+
registry-url: 'https://registry.npmjs.org'
52+
package-manager-cache: false
53+
54+
- name: Update npm
55+
run: npm install --global npm@^11.15.0
5256

5357
- name: Enable Corepack
5458
run: corepack enable yarn
@@ -62,8 +66,5 @@ jobs:
6266
- name: Run tests from transpiled code
6367
run: npx ocular-test dist
6468

65-
- name: Login to NPM
66-
run: npm config set "//registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}"
67-
6869
- name: Publish to NPM
6970
run: npx ocular-publish from-git

0 commit comments

Comments
 (0)