Skip to content

Use trusted publishing#62

Open
simongdavies wants to merge 3 commits intohyperlight-dev:mainfrom
simongdavies:use-trusted-publishing
Open

Use trusted publishing#62
simongdavies wants to merge 3 commits intohyperlight-dev:mainfrom
simongdavies:use-trusted-publishing

Conversation

@simongdavies
Copy link
Copy Markdown
Member

This pull request updates the npm publishing workflow to use OIDC trusted publishing with provenance for release-triggered publishes, enhancing security by removing the need for a long-lived NPM_TOKEN secret. Manual publishes via workflow_dispatch still fall back to NPM_TOKEN. Documentation has been updated to explain these changes and the new publishing process.

Copilot AI review requested due to automatic review settings April 20, 2026 12:12
@simongdavies simongdavies added the enhancement New feature or request label Apr 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release publishing pipeline to use npm OIDC trusted publishing (with provenance) for GitHub Release-triggered publishes, reducing reliance on long-lived npm credentials, and documents the updated release flow.

Changes:

  • Add id-token: write and publish with --provenance for release-triggered npm publishes (OIDC trusted publishing).
  • Keep workflow_dispatch publishing via NPM_TOKEN (without provenance) and document the split behavior.
  • Start tracking Rust Cargo.lock files by updating .gitignore and committing lockfiles for the runtime and analysis guest.

Reviewed changes

Copilot reviewed 3 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/publish.yml Enables OIDC trusted publishing and provenance for release-triggered npm publishes; keeps token-based fallback for manual dispatch.
docs/RELEASING.md Documents the new trusted publishing setup/prerequisites and clarifies the manual fallback path.
CHANGELOG.md Adds an Unreleased entry describing the publishing change.
.gitignore Stops ignoring Cargo.lock (and runtime lockfile), allowing Rust lockfiles to be committed.
src/sandbox/runtime/Cargo.lock New committed Rust dependency lockfile for the sandbox runtime workspace.
src/code-validator/guest/Cargo.lock New committed Rust dependency lockfile for the code-validator guest workspace.

Comment thread .github/workflows/publish.yml Outdated
Comment thread .github/workflows/publish.yml Outdated
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Remove Cargo.lock from .gitignore and track lock files for both
Rust workspaces (code-validator/guest and sandbox/runtime).

Prevents transitive dependency MSRV breakage (e.g. constant_time_eq
0.4.3 requiring rustc 1.95.0) when building on CI with pinned
toolchain versions.
@simongdavies simongdavies force-pushed the use-trusted-publishing branch from 2e85028 to 8e9dee1 Compare April 20, 2026 12:42
Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants