Skip to content

Commit 0a6bc75

Browse files
authored
Merge branch 'main' into feat/scene-delegate
2 parents 3e3e4d3 + ed3802b commit 0a6bc75

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
publish_template:
2222
runs-on: ubuntu-latest
2323
environment: npm-publish
24+
permissions:
25+
# Required for npm trusted publishing (OIDC token exchange with the registry)
26+
id-token: write
27+
# Required so the bump commit & tag can be pushed back to the branch
28+
contents: write
2429
steps:
2530
- name: Safeguard against branch name
2631
run: |
@@ -31,10 +36,18 @@ jobs:
3136
- name: Checkout
3237
uses: actions/checkout@v4.1.1
3338
- name: Setup node.js
34-
uses: actions/setup-node@v4.0.0
39+
# setup-node@v6 supports npm trusted publishing (OIDC): with `registry-url`
40+
# set and no token provided, it configures the registry without writing a
41+
# bogus NODE_AUTH_TOKEN placeholder, so `npm publish` performs the OIDC
42+
# token exchange. Older versions (e.g. v4) wrote a placeholder token that
43+
# made npm attempt token auth instead, failing with E404/ENEEDAUTH.
44+
uses: actions/setup-node@v6
3545
with:
3646
node-version: 'lts/*'
3747
registry-url: 'https://registry.npmjs.org'
48+
# Never cache dependencies in a publishing workflow: a poisoned cache
49+
# could expose the short-lived OIDC token.
50+
package-manager-cache: false
3851
- name: Determine new template version
3952
run: echo "VERSION=$(./scripts/bumpedTemplateVersion.sh ${{ inputs.version }})" >> $GITHUB_ENV
4053
- name: Update versions to input one

0 commit comments

Comments
 (0)