Skip to content

ci: auto-tag releases from the CHANGELOG — merging this PR cuts v1.81.6#46

Merged
SyntaxNyah merged 1 commit into
mainfrom
claude/client-idle-disconnect-9ueqmt
Jul 24, 2026
Merged

ci: auto-tag releases from the CHANGELOG — merging this PR cuts v1.81.6#46
SyntaxNyah merged 1 commit into
mainfrom
claude/client-idle-disconnect-9ueqmt

Conversation

@SyntaxNyah

Copy link
Copy Markdown
Owner

What this does

Adds .github/workflows/autotag.yml: on every push to main it reads the newest ## vX.Y.Z heading from internal/ui/assets/CHANGELOG.md (the exact file release.yml already renders release notes from), and if that version has no tag yet it:

  1. tags the pushed commit with it, and
  2. dispatches the Release pipeline on that tag ref.

Releasing becomes: add the new CHANGELOG section in your PR (already the convention), merge, done. No manual git push origin vX.Y.Z ever again.

Merging this PR ships v1.81.6

The CHANGELOG's current head is ## v1.81.6 (the idle-disconnect fix from #45, already on main) and that tag doesn't exist yet — so the merge of this PR fires the workflow, tags v1.81.6, and starts the full multi-platform release build automatically. Watch it under Actions → Release; the published notes will be the v1.81.6 CHANGELOG section.

Why the explicit dispatch

Tags pushed with a workflow's own GITHUB_TOKEN deliberately never trigger other workflows (GitHub's recursive-workflow guard), so a pushed tag alone would sit unbuilt. An API workflow_dispatch is allowed, and dispatching with --ref <tag> runs release.yml with github.ref = refs/tags/<ver> — exactly what its publish gate (startsWith(github.ref, 'refs/tags/')) and gh release create --verify-tag require.

Safety properties

  • Idempotent: an already-tagged version is a no-op, so ordinary pushes to main between releases do nothing, and re-runs are always safe.
  • Manual tags unchanged: a hand-pushed tag still triggers release.yml directly; the workflow then just sees the tag exists and exits.
  • Prereleases: a hyphenated version heading (e.g. v1.82.0-test.1) flows through to release.yml's existing --prerelease detection untouched.
  • Scoped permissions: contents: write (tag push) + actions: write (dispatch) only.

Generated by Claude Code

Merging a release PR now ships the release with no manual tag push: on
every push to main, autotag.yml reads the newest '## vX.Y.Z' heading from
internal/ui/assets/CHANGELOG.md (the same source release.yml renders the
release notes from), tags the pushed commit if that version is untagged,
and dispatches the Release pipeline on the tag ref.

The explicit dispatch exists because refs pushed with a workflow's own
GITHUB_TOKEN never trigger other workflows (GitHub's recursion guard) — a
pushed tag alone would sit unbuilt. workflow_dispatch on the tag ref sets
github.ref to refs/tags/<ver>, satisfying release.yml's publish gate and
--verify-tag. Manual tag pushes keep working unchanged; the workflow is
idempotent (existing tag = no-op).

Merging this commit itself tags v1.81.6 (the current CHANGELOG head,
still untagged) and cuts that release.
@SyntaxNyah
SyntaxNyah merged commit 038a949 into main Jul 24, 2026
1 check passed
@SyntaxNyah
SyntaxNyah deleted the claude/client-idle-disconnect-9ueqmt branch July 24, 2026 16:35
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