Skip to content

Commit 5d558d2

Browse files
committed
fix: resolve npm OIDC trusted publishing 404 error [patch]
1 parent 32b5289 commit 5d558d2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ jobs:
2929
bun-version: latest
3030

3131
# Setup Node.js for npm publish with trusted publishers
32+
# Node 24 is required for OIDC trusted publishing to work properly
3233
- name: Setup Node.js
3334
uses: actions/setup-node@v4
3435
with:
35-
node-version: '20'
36+
node-version: '24'
3637
registry-url: 'https://registry.npmjs.org'
3738

3839
# Upgrade npm to 11.5.1+ (required for trusted publishers)
@@ -94,8 +95,11 @@ jobs:
9495

9596
# Use npm for publishing with trusted publishers (OIDC - no token needed)
9697
# Provenance is automatically generated with trusted publishing
98+
# NPM_CONFIG_PROVENANCE=true is required to fix OIDC 404 bug (npm/cli#8730)
9799
- name: Publish to npm with provenance
98100
run: npm publish --provenance --access public
101+
env:
102+
NPM_CONFIG_PROVENANCE: true
99103

100104
- name: Create git tag
101105
run: |

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
"url": "https://github.com/Michael-Obele/sveltekit-api-gen/issues"
1414
},
1515
"homepage": "https://sveltekit-openapi-generator.netlify.app",
16+
"publishConfig": {
17+
"access": "public",
18+
"provenance": true
19+
},
1620
"keywords": [
1721
"sveltekit",
1822
"openapi",

0 commit comments

Comments
 (0)