Skip to content

Commit bcbb21d

Browse files
ci: fix OIDC publishing — Node 24, npm latest, provenance
- Use Node.js 24 + npm@latest for OIDC provenance support - Add id-token: write permission - Add registry-url for npm auth - Add .npmrc with provenance=true and access=public - Fix repository URL (git:// → https://) for npm provenance linking - Drop NPM_TOKEN in favor of OIDC
1 parent dc24387 commit bcbb21d

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,33 @@ jobs:
1111
release:
1212
name: Release
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
id-token: write
1418
steps:
1519
- name: Checkout Repo
1620
uses: actions/checkout@v4
21+
with:
22+
fetch-tags: true
1723

1824
- name: Setup Node.js
1925
uses: actions/setup-node@v4
2026
with:
21-
node-version: 18
27+
node-version: '24'
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Update npm to latest
31+
run: npm install -g npm@latest
2232

2333
- name: Install Dependencies
2434
run: npm install
2535

2636
- name: Create Release Pull Request or Publish
27-
id: changesets
2837
uses: changesets/action@v1
2938
with:
3039
publish: npm run release
3140
title: "Version Packages (2.x)"
3241
commit: "Version Packages (2.x)"
3342
env:
3443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

‎.npmrc‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
provenance=true
2+
access=public

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"repository": {
2020
"type": "git",
21-
"url": "git://github.com/TooTallNate/once.git"
21+
"url": "https://github.com/TooTallNate/once.git"
2222
},
2323
"keywords": [],
2424
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",

0 commit comments

Comments
 (0)