Skip to content

Commit 6f25916

Browse files
cs-rajclaude
andcommitted
fix(ci): add npm provenance and update npm before publishing
- Add 'Update npm' step (npm install -g npm@latest) before publish in both release jobs — ensures npm supports --provenance (requires npm 9+) - Add provenance: true to all JS-DevTools/npm-publish@v3 steps so the OIDC token granted by id-token:write is actually used to generate SLSA attestations on npmjs.com Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0186fea commit 6f25916

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/release-production-core.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ jobs:
4141
filename: .github/config/release.json
4242
prefix: release
4343

44+
- name: Update npm
45+
run: npm install -g npm@latest
46+
4447
- name: Publishing core (Production)
4548
id: publish-core
4649
uses: JS-DevTools/npm-publish@v3
4750
with:
4851
token: ${{ secrets.NPM_TOKEN }}
4952
package: ./packages/contentstack/package.json
5053
tag: latest
54+
provenance: true
5155

5256
- name: Create Core Production Release
5357
id: create_release

‎.github/workflows/release-production-platform-plugins.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ jobs:
4141
filename: .github/config/release.json
4242
prefix: release
4343

44+
- name: Update npm
45+
run: npm install -g npm@latest
46+
4447
# Utilities
4548
- name: Publishing utilities (Production)
4649
uses: JS-DevTools/npm-publish@v3
4750
with:
4851
token: ${{ secrets.NPM_TOKEN }}
4952
package: ./packages/contentstack-utilities/package.json
5053
tag: latest
54+
provenance: true
5155

5256
# Command
5357
- name: Publishing command (Production)
@@ -56,6 +60,7 @@ jobs:
5660
token: ${{ secrets.NPM_TOKEN }}
5761
package: ./packages/contentstack-command/package.json
5862
tag: latest
63+
provenance: true
5964

6065
# Config
6166
- name: Publishing config (Production)
@@ -64,6 +69,7 @@ jobs:
6469
token: ${{ secrets.NPM_TOKEN }}
6570
package: ./packages/contentstack-config/package.json
6671
tag: latest
72+
provenance: true
6773

6874
# Auth
6975
- name: Publishing auth (Production)
@@ -72,3 +78,4 @@ jobs:
7278
token: ${{ secrets.NPM_TOKEN }}
7379
package: ./packages/contentstack-auth/package.json
7480
tag: latest
81+
provenance: true

0 commit comments

Comments
 (0)