Skip to content

Publish releases automatically when the version changes - #3

Merged
talayash merged 2 commits into
mainfrom
release-cd
Oct 20, 2026
Merged

talayash merged 2 commits into
mainfrom
release-cd

Conversation

@talayash

Copy link
Copy Markdown
Owner

Summary

Continuous delivery for the plugin: merging a version bump publishes a release.

  • .github/workflows/release.yml: runs after the Test workflow succeeds for a push to main. Reads the version from .claude-plugin/plugin.json; if vX.Y.Z is not tagged yet, creates the tag on the tested commit and publishes a GitHub Release with auto-generated notes. Otherwise it exits without doing anything.
  • npm run bump -- X.Y.Z (scripts/bump-version.mjs): sets the version in package.json, plugin.json and marketplace.json, editing only the version line so formatting is untouched.
  • tests/version.test.mjs: fails CI if the three versions disagree, so a half-done bump cannot be merged.
  • README: new "Releasing" section.

Notes

  • Stacked on Run tests in CI #2. The release workflow is triggered by the Test workflow from Run tests in CI #2, so this branch includes that commit. Merge Run tests in CI #2 first (or merge this PR, which brings both).
  • First release: 0.1.0 has never been tagged, so the first passing run on main after merge will publish v0.1.0 for the current code.
  • Releases are tied to the exact commit that passed tests (workflow_run.head_sha), and concurrency: release prevents two runs racing on the same tag.

Testing

  • npm test: 17 pass (new version test included).
  • npm run bump -- 9.9.9 changed one line in each manifest and tests still passed; reverting with bump -- 0.1.0 left no diff; an invalid version is rejected.
  • Workflow YAML parses. The release job itself can only run on main after merge (workflow_run triggers from the default branch only).

🤖 Generated with Claude Code

talayash and others added 2 commits October 20, 2026 11:00
Run npm test on every push to main and every pull request, on Node 18,
20 and 22 (Linux) plus Node 22 on Windows. Add a status badge to the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After the Test workflow passes on main, tag plugin.json's version and
publish a GitHub Release with generated notes, unless that tag exists.
Add `npm run bump -- X.Y.Z` to set the version in all three manifests,
and a test that fails when they disagree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@talayash
talayash merged commit 5b200ff into main Oct 20, 2026
4 checks passed
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.

1 participant