Repository navigation
chore(release): publish to npm with trusted publishing - #99
Conversation
Publish on release:published from release.yml so the npm trusted publisher can be keyed on the filename, drop the NPM_TOKEN passed to JS-DevTools/npm-publish 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. The tarball is attached to the release from a separate job with gh release upload instead of the archived upload-release-asset action. GitHub pre-releases go to the beta dist-tag. 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
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Direct release-tag interpolation allows shell command execution in the write-enabled upload job.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Migrates the filesystem content store’s npm release workflow from token authentication to OIDC trusted publishing.
Changes:
- Publishes on release publication using Node 24, with separate stable and prerelease tags.
- Uses clean dependency installs and explicit release-tag checkouts.
- Uploads release tarballs through a separate GitHub CLI job after publishing.
| File | Description |
|---|---|
.github/workflows/release.yml |
Replaces token-based publishing and modernizes release asset uploads. |
💡 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 tag now reaches the upload step through the RELEASE_TAG env variable instead of being interpolated into the shell line (GitHub Actions script-injection hardening). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
overrides.brace-expansion: 5.0.9 -> 5.0.12 Fixes SNYK-JS-BRACEEXPANSION-20244948, -20244950, -20244952 (via rimraf > glob > minimatch). package-lock.json regenerated from a clean install. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |


Problem
release.ymlpublishes@contentstack/datasync-content-store-filesystemto npm with a long-livedNPM_TOKENthroughJS-DevTools/npm-publish@v3, and attaches the tarball to the release with the archivedactions/upload-release-asset@v1.The SE1 publishing policy requires OIDC trusted publishing instead: no token, a
release.ymlworkflow that runs when a release is published, Node 24.The last release, v2.1.12 (May), failed at the npm publish step, so npm is still at 2.1.11 while
masteris at 2.1.14.Fix
release.ymlis rewritten in place. What changes inside it:release: createdrelease: publishedNPM_TOKENviaJS-DevTools/npm-publish@v3id-token: write, no token, plainnpm publishnpm publish --access public; pre-releases go to thebetadist-tag, releases tolatestactions/upload-release-asset@v1(archived) inside the publish jobupload-release-assetjob, runs after a successful publish:npm pack+gh release upload --clobberwith the job tokennpm installnpm cinpm run build-tspersist-credentials: falsecheckout@v4,setup-node@v4@v7Verification
Node 22 and Node 24: install, build and
npm packall pass.