This document captures the release and publishing workflow for the Framework Kit
packages. The process mirrors what we use in
create-solana-dapp,
with a single trusted workflow handling both canary snapshots and stable
publishes.
- We use Changesets for semantic versioning.
- Any change that affects an npm package must include a changeset. Run
pnpm changeset, select the touched packages, choose the semver bump, and add a short changelog entry. - When PRs with pending changesets merge into
main, the Changesets GitHub bot automatically opens a "Version Packages" PR that bumps package versions and updates CHANGELOG entries.
The .github/workflows/publish-packages.yml workflow is the only trusted
workflow registered with npm. It runs automatically on every push to main,
and it can also be triggered manually via the Run workflow button.
-
Stable releases (
regularpath)
Pushes tomainalways run the workflow withrelease_type=regular. The job lint/tests/builds the repo and invokeschangesets/action. As long as there are pending changesets, the action keeps the bot-owned "Version Packages" PR up to date. When that PR is merged (meaning no pending changesets remain), the workflow automatically runspnpm publish-packages(which maps topnpm changeset publish) to publish new versions to npm with thelatesttag. -
Canary releases (
canarypath)
To publish a snapshot, manually run the workflow from the Actions tab and set therelease_typeinput tocanary. The job will run lint/test/build, callpnpm changeset version --snapshot canary, rebuild, and publish the affected packages under thecanarynpm tag (viapnpm changeset publish --tag canary). Consumers can install these previews through@solana/<package>@canary.
- npm trusted publishing must remain configured for the
solana-foundation/framework-kitrepository and the.github/workflows/publish-packages.ymlworkflow filename. - The default
GITHUB_TOKENhandles release PR automation, and npm is accessed via OIDC—noNPM_TOKENor extra PAT is necessary. - Trigger manual runs from the workflow's Run workflow button whenever you need a canary snapshot or to re-run a failed publish.