Repository navigation
Conversation
Publish on release:published from release.yml so the npm trusted publisher can be keyed on the filename, drop NODE_AUTH_TOKEN in favour of id-token: write (OIDC), run on Node 24 with npm@latest (trusted publishing needs npm >= 11.5.1), check out the release tag without persisted credentials. GitHub pre-releases go to the beta dist-tag. The GitHub Packages job gains the packages: write permission it was missing and keeps publishing with the job's own token. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The workflow changes consistently implement the described release policy without identified defects.
Review effort: Balanced
Findings: None
What changed in this PR
Replaces token-based package publishing with release-triggered OIDC trusted publishing.
Changes:
- Publishes npm releases with Node 24 and prerelease-aware dist-tags.
- Adds required GitHub Packages permissions and safer checkout settings.
- Removes the superseded
npm-publish.ymlworkflow.
| File | Description |
|---|---|
.github/workflows/release.yml |
Adds npm and GitHub Packages release jobs. |
.github/workflows/npm-publish.yml |
Removes the legacy token-based workflow. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Refuse to publish when the release tag is not "v" + the package.json version, so a tag cut on the wrong commit cannot publish an older version under a newer tag. The GitHub Packages job now uses the same beta/latest dist-tag rule as the npm job, so a GitHub pre-release never becomes latest on either registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Snyk (snyk test --all-projects): 13 issues (8 high, 5 medium, all axios 1.18.1) -> 0. Regenerated package-lock.json (axios 1.18.1 -> 1.20.0). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |

Problem
npm-publish.ymlpublishes@contentstack/marketplace-sdkto npm with a long-livedNPM_TOKEN.The SE1 publishing policy requires OIDC trusted publishing instead: no token, a
release.ymlworkflow that runs when a release is published, Node 24.The GitHub Packages job also lacks the
packages: writepermission it needs.Fix
npm-publish.ymlis renamed torelease.yml. What changes inside it:release: createdrelease: publishedNPM_TOKENid-token: write, no tokennpm publish --access publicbetadist-tag, releases tolatestsecrets.GITHUB_TOKEN, nopackages: writegithub.token(same token) withpackages: writepersist-credentials: falsecheckout@v4,setup-node@v4@v7Verification
Node 22 and Node 24: install, build, unit tests and
npm packall pass.