Skip to content

Commit f2f6a91

Browse files
committed
Use npm trusted publishing only
1 parent 8827f99 commit f2f6a91

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

.github/workflows/npm-publish.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,33 @@ name: Publish package to NPM
66
on:
77
workflow_dispatch: ~
88
release:
9-
types: [created]
9+
types: [published]
10+
11+
permissions:
12+
id-token: write # Required for OIDC / npm
13+
contents: read
1014

1115
jobs:
1216
build:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/setup-node@v4
17-
with:
18-
node-version: 20
19-
- run: corepack enable
20-
- run: yarn install --immutable
21-
# - run: npm test
2217

2318
publish-npm:
2419
needs: build
2520
runs-on: ubuntu-latest
26-
permissions:
27-
contents: read
28-
id-token: write
2921
steps:
30-
- uses: actions/checkout@v4
31-
- uses: actions/setup-node@v4
22+
- uses: actions/checkout@v5
23+
- uses: actions/setup-node@v5
3224
with:
33-
node-version: 20
34-
registry-url: https://registry.npmjs.org/
25+
node-version: 24
26+
3527
- run: corepack enable
28+
3629
- run: yarn install --immutable
30+
31+
- run: yarn run build
32+
33+
# Ensure npm 11.5.1 or later is installed
34+
- name: Update npm
35+
run: npm install -g npm@latest
36+
3737
- run: npm publish --provenance
3838
working-directory: ./packages/devtools
39-
env:
40-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

packages/devtools/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"build": "yarn clean && yarn run build:types && yarn run build:module",
2424
"lint:types": "tsc --noEmit",
2525
"lint": "yarn run lint:types",
26-
"prepublishOnly": "yarn build",
2726
"test": "jest"
2827
},
2928
"keywords": [

0 commit comments

Comments
 (0)