Skip to content

Commit cdf587d

Browse files
James/memoize survey factory (#212)
* updated wrapper * move react to peer dependency * fix vite dev dep * Skip screenshots in CI * Move to trusted publisher https://docs.npmjs.com/trusted-publishers * update publishing scripts * Update publish.yml * Update publish.yml * Update publish.yml * Update publish.yml
1 parent 0b0846c commit cdf587d

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,24 @@ on:
44
branches:
55
- main
66

7+
permissions:
8+
id-token: write # required for npm trusted publisher (OIDC)
9+
contents: read
10+
711
jobs:
8-
build:
12+
publish:
913
runs-on: ubuntu-latest
10-
permissions:
11-
contents: read
12-
id-token: write # required for npm trusted publisher (OIDC)
13-
env:
14-
NODE_AUTH_TOKEN: "" # ensure we rely on OIDC, not a token
1514

1615
steps:
1716
- uses: actions/checkout@v4
1817
- uses: actions/setup-node@v4
1918
with:
20-
node-version: "20.x"
19+
node-version: "20"
2120
registry-url: "https://registry.npmjs.org"
22-
- name: Clean legacy npm auth config
23-
run: npm config delete //registry.npmjs.org/:_authToken || true
24-
21+
- name: Use latest npm (trusted publisher support)
22+
run: npm install -g npm@latest
2523
- run: npm ci
2624
- run: npm run build
2725

28-
# OIDC auth + provenance; no token needed when using trusted publishers
29-
- run: npm publish --provenance --access public
26+
# OIDC auth: no token needed when using trusted publishers
27+
- run: npm publish

0 commit comments

Comments
 (0)