Skip to content

publish-js: add npm trusted publishing + gh app release flow#27

Merged
joncinque merged 2 commits into
solana-program:mainfrom
nbelenkov:adding_js_trusted_publishing
May 14, 2026
Merged

publish-js: add npm trusted publishing + gh app release flow#27
joncinque merged 2 commits into
solana-program:mainfrom
nbelenkov:adding_js_trusted_publishing

Conversation

@nbelenkov
Copy link
Copy Markdown
Contributor

Summary

Removes ANZA_TEAM_PAT and SOLANA_PROGRAM_NPM_TOKEN from the JS publish workflow, extending the same supply chain hardening from the Rust workflow to JS packages.

  • Trusted publishing for @solana-program: removes the static npm token in favour of OIDC, both @solana and @solana-program packages now authenticate via trusted publishing
  • GitHub App: replaces the PAT for git operations, enabling a tag protection ruleset that only the App can bypass
  • Environment gate* publish job runs under environment: prod, allowing consuming repos to require manual approval before secrets are accessed

Setup required in each consuming repo

  • Create a prod environment with APP_ID variable and PRIVATE_KEY secret (same App as Rust workflow)
  • Configure npm trusted publishing on npmjs.com for each @solana-program/* package (workflow: caller workflow file, environment: prod)

@joncinque joncinque self-requested a review March 25, 2026 20:13
Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

This looks good too! Same with #26, shall we set everything up before landing this?

@nbelenkov
Copy link
Copy Markdown
Contributor Author

the app and repo configs are done, we just need to update npm settings for each package

@joncinque
Copy link
Copy Markdown
Contributor

Settings have been updated on all @solana-program npm packages, so this should be good to go!

Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Actually, before we get this in, can we add a step to output the job parameters?

@nbelenkov
Copy link
Copy Markdown
Contributor Author

nbelenkov commented May 14, 2026

added context @joncinque, if you are happy, should be good to merge

Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@joncinque joncinque merged commit c93d2d4 into solana-program:main May 14, 2026
@joncinque joncinque changed the title adding npm trusted publishing + gh app release flow for js publish publish-js: add npm trusted publishing + gh app release flow May 14, 2026
@nbelenkov nbelenkov deleted the adding_js_trusted_publishing branch May 14, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants