Skip to content

ci(publish): create a GitHub Release for each version - #9

Merged
lonetis merged 1 commit into
mainfrom
claude/wonderful-pasteur-lkdysc
Oct 20, 2026
Merged

lonetis merged 1 commit into
mainfrom
claude/wonderful-pasteur-lkdysc

Conversation

@lonetis

@lonetis lonetis commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a github-release job to publish.yml that creates a GitHub Release for each version, so versions appear under Releases on the repo page next to the Packages entry from #8.

  • Coverage: every version on npm that doesn't have a release yet gets one, not just the current version. The first run on main backfills v0.1.0, v0.2.0, v0.3.0 and v0.3.1. If a run is ever missed, the next one catches up.

  • Commit: each tag vX.Y.Z is placed on the commit that released that version: the first commit on main (first-parent) whose package.json has it. For the existing versions:

    Tag Commit
    v0.1.0 1de7240 initial release
    v0.2.0 a6d9b63 MCP tool annotations
    v0.3.0 5b563d2 merge of chore(release): bump version to 0.3.0 #5
    v0.3.1 65083e0 merge of chore(release): bump version to 0.3.1 #7
  • Notes: GitHub's auto-generated notes (merged PRs plus a "Full Changelog" compare link), preceded by a line linking the npm version with its npm install command.

  • Order: releases are created oldest first, so the newest version is marked Latest.

  • Safety: the job runs after the npm job (needs: publish), so only versions that reached npm get a release. It needs contents: write, set on this job only, and uses the built-in GITHUB_TOKEN through gh.

CLAUDE.md's publishing section describes the new job.

Verification

  • actionlint 1.7.7 with shellcheck reports no issues for publish.yml and ci.yml.
  • Ran the job's script locally with bash -e, as GitHub runs it, against the real git history and the real npm version list, with a fake gh that pretended v0.2.0 already existed. It skipped v0.2.0 and printed the gh release create calls for v0.1.0, v0.3.0 and v0.3.1 with the commits and notes above.
  • The PR's CI doesn't run publish.yml. The first real run is the push to main when this merges.

Generated by Claude Code

Adds a third Publish job that creates a GitHub Release (tag `vX.Y.Z` plus
auto-generated notes and an npm install line) for every version on npm that
lacks one, so versions show under Releases on the repo page.

Each release is tagged at the commit that released the version: the first
commit on main (first-parent) whose package.json carries it. Because it works
from the list of npm versions rather than only the current one, the first run
backfills 0.1.0 through 0.3.1, and a missed or failed run heals on the next.
It runs after the npm job, so only versions that reached npm get a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015XnPdQXFWDT6FTnQs1d1f1
@lonetis
lonetis marked this pull request as ready for review October 20, 2026 13:25
@lonetis
lonetis merged commit 7d9edf4 into main Oct 20, 2026
2 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-20T13:25:29.365842Z 102bcfd Draft marked ready
🔒 Security Review ✅ Completed 2026-10-20T13:26:42.297885Z 102bcfd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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