Repository navigation
ci: release from a dispatched workflow and sync the plugin version - #109
Merged
Merged
Conversation
kpal81xd
force-pushed
the
ci/release-workflow
branch
from
October 12, 2026 14:24
c786b4b to
0dfc127
Compare
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.
Summary
Replaces
release.shand the tag-triggered publish workflow with one manually dispatchedPublishworkflow that bumps the version, keeps the plugin pin in sync, publishes to npm, then pushes and creates the GitHub release. Stacked on #107..github/workflows/publish.yml: rewritten in place (same filename) as aworkflow_dispatchworkflow with atypechoice ofpatch,minor,major,premajororprerelease. Prereleases use--preid=beta, asrelease.shdid. It only runs onmaininplaycanvas, andconcurrency: publishstops two releases overlapping.scripts/sync-plugin-version.mjs: writes the rootpackage.jsonversion intoplugin/.claude-plugin/plugin.jsonversion, the@x.y.zpin inplugin/.mcp.json, and the same pin in the "What it runs" block ofplugin/README.md.--checkexits non-zero if any of them differ. It always passes whenpackage.jsonis on a prerelease, so CI onmainstays green after a beta.release.sh: removed.Version policy
patch,minor,major) move the plugin pin in all three places, in the same commit aspackage.jsonandpackage-lock.json.premajor,prerelease) leaveplugin/untouched, so plugin users stay on the last stable version. The beta is published to thebetadist-tag and its GitHub release is marked as a prerelease. This settles the open question in ci: release from a dispatched workflow and keep the plugin version pin in sync #105.Order of steps
github-actions[bot]and create an annotatedvX.Y.Ztag. Nothing is pushed yet.npm publish --provenancewith dist-tagbetafor prereleases andlatestotherwise.git push --atomic origin HEAD:main "$TAG".Release and publish run in one job because a tag pushed with
GITHUB_TOKENdoesn't trigger other workflows. Publishing comes before the push, so a failed publish leavesmainand the tags as they were, and you can just re-run. Commit and tag messages are the bare version (0.8.0), the same asnpm versionproduced for earlier tags.Recovery:
mainmoved during the run): the version is on npm but not in the repo. Bump, sync, commit and tag that same version onmainby hand, push it, then create the release.Notes for review
vX.Y.Zcommit, because publishing happens before the release commit is pushed. Under the old tag-triggered flow, the two were the same commit.publish.ymlkeeps that configuration matching. I can't see the npm side.mainhas rulesets for deletion and non-fast-forward only, so the bot push tomainshould be allowed. A real run is the first proof.Closes #105
Manual smoke test
main, open Actions, choose Publish, then Run workflow onmainwith typepatch. Expected: the run succeeds andmaingets onegithub-actions[bot]commit, titled with the new version, that changespackage.json,package-lock.json,plugin/.claude-plugin/plugin.json,plugin/.mcp.jsonandplugin/README.md.vX.Y.Ztag on that commit, and a GitHub release with generated notes that isn't marked as a prerelease.latestand shows a provenance badge linked to the Publish run.mainand start Claude Code withclaude --plugin-dir plugin. Expected:/pluginshowsplaycanvas-editorat the new version, and/mcpconnectsplugin:playcanvas-editor:playcanvasrunning the new npm version.prerelease. Expected: avX.Y.(Z+1)-beta.0tag and a GitHub release marked as a prerelease. The new version appears on npm under thebetadist-tag, whilelateststays on the stable version. The release commit changes onlypackage.jsonandpackage-lock.json, andplugin/still pins the stable version from step 1.main. Expected: the job is skipped and nothing is published or pushed.