Repository navigation
Make the release workflow publish-only - #1453
Merged
Merged
Conversation
Release versions will reach main already versioned, from a release PR that this workflow no longer opens. On each push to main it now only publishes what the commit versioned. - `changesets/action/select-mode` picks the mode. In `publish` mode, `changesets/action/publish` publishes to npm, pushes the tags and creates the GitHub releases, as before. - While a changeset is pending, the run fails if a version is not on npm yet, and publishes nothing: that commit's changelog would not list every change it ships. - The npm, extension and crates publishes are separate jobs, so one failing does not stop the others. - The workflow token is read-only by default. Only the npm job can write tags and releases.
charlespwd
force-pushed
the
cpc-15/publish-only-release
branch
from
December 1, 2026 20:43
9d2af0e to
4b809d7
Compare
charlespwd
enabled stacked auto-merge (squash)
December 2, 2026 15:55
EvilGenius13
approved these changes
Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR
release.ymlstops opening release PRs and only publishes. When a commit onmainhas no pending changeset and carries versions that npm doesn't have yet, it publishes them, pushes the tags and creates the GitHub releases, as today.Merge order: this PR sits on #1452 (Changesets 3), and must merge after the next release PR has merged and published. Once this lands, nothing opens or updates a release PR here.
Problem
Releases will be versioned before they reach this repository. A release PR opened and merged on GitHub would then be a second source of versions on
main.Solution
On every push to
main,changesets/action/select-modepicks a mode:publishversionnonepublish-npm,publish-extensionandpublish-crateseach start fromselect-mode, so a crates.io failure doesn't stop the npm, VS Code Marketplace or Open VSX publish. The extension and crates jobs run inpublishandnonemode, and compare their versions with their registries as today, because the extension and the crates aren't on npm.contents: read. Onlypublish-npmgetscontents: write, for tags and releases, andid-token: writefor trusted publishing.queue: max) and never cancel, so a newer push can't cut a run between the npm publish and the tags.actionlintdoesn't knowqueueyet and flags it; GitHub accepts it.vscode-release.ymlstays as the manual way to publish the extension.publish-cratesis unchanged. It keeps failing at the token exchange until crates.io trusted publishing is set up for this repository.Validation
I ran
select-modefromchangesets/actionat the pinned commit, and the new check's script taken from this workflow, on a copy of this branch:nonepnpm releasewith a test changesetpublishversion@shopify/theme-graphversionNot tested: a real publish. Only a push to
mainruns it.