Skip to content

Commit 3ea99f2

Browse files
committed
chore: update publish workflow
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 3b40cd1 commit 3ea99f2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/npm-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ on:
1313
types: [published]
1414

1515
permissions:
16+
id-token: write # Required for OIDC
1617
contents: read
17-
packages: write
1818

1919
jobs:
2020
publish:
2121
runs-on: ubuntu-latest
2222
name: Build and publish to npm
23+
environment: npm-publish
2324

2425
steps:
2526
- name: Checkout
@@ -32,9 +33,10 @@ jobs:
3233
id: versions
3334

3435
- name: Set up node
35-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
36+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
3637
with:
3738
node-version: ${{ steps.versions.outputs.node-version }}
39+
registry-url: https://registry.npmjs.org
3840

3941
- name: Set up npm
4042
run: npm i -g 'npm@${{ steps.versions.outputs.package-manager-version }}'
@@ -54,7 +56,7 @@ jobs:
5456
env:
5557
CYPRESS_INSTALL_BINARY: 0
5658
run: |
57-
npm ci
59+
npm ci --ignore-scripts
5860
npm run build --if-present
5961
6062
- name: Fetch latest tag
@@ -73,8 +75,6 @@ jobs:
7375

7476
- name: Publish
7577
run: |
76-
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
7778
npm publish --tag $RELEASE_GROUP
7879
env:
79-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8080
RELEASE_GROUP: ${{ (contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha')) && 'next' || ((steps.latest-tag.outputs.LATEST_TAG != github.event.release.tag_name) && 'stable' || 'latest') }}

0 commit comments

Comments
 (0)