Skip to content

ci: cut releases from main, and let the run cut the changelog - #678

Merged
andiwand merged 1 commit into
mainfrom
ci/release-from-main
Aug 9, 2026
Merged

ci: cut releases from main, and let the run cut the changelog#678
andiwand merged 1 commit into
mainfrom
ci/release-from-main

Conversation

@andiwand

@andiwand andiwand commented Aug 9, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Stacked on #677 — review that one first.

releases existed to hold the stamp commit, and cost tag reachability: since
the train, tags sit on commits main never sees, so git describe main is stuck
at v6.1.0 and release.py version cannot answer from main.

  • Dispatch is the only trigger. A tag push cannot be one — the tag has to land
    on the stamp commit the run makes. The first job refuses a ref that is neither
    main nor release/**, since the dispatch UI offers every branch.
  • The stamp goes to main, so tags become ancestors of main again.
  • release.py cut heads the entries with the version and opens a fresh
    ## Unreleased, so there is no manual cut and nothing to sync between
    branches. It is idempotent, for re-runs.
  • changelog reads ## <version> if it exists and ## Unreleased otherwise —
    the same lines before and after the cut, which is what lets the first job
    check the copy before anything is built.
  • contents: write is scoped to the job that pushes; the other eight workflows
    drop the release-branch exclusion and take branches: ['**'] instead, so a
    published release's tag push does not run them twice.

Verified locally against git-cliff 2.13.1: check before the cut, dry-run cut,
cut, re-run cut, notes from the cut section, and the empty-Unreleased refusal.

Not done: the bypass

Pushing to main from the run needs the GitHub Actions app on the main
ruleset's bypass list, and the API refuses it:

Actor GitHub Actions integration must be part of the ruleset source or owner
organization

GitHub Actions is not an org installation, and the documented bypass actors are
roles, teams, installed GitHub Apps and Dependabot. So this needs either a
GitHub App for releases, or a PAT belonging to someone the existing role bypass
already covers — and with either, the stamp push starts the other workflows,
which GITHUB_TOKEN currently suppresses. Do not merge before that is
settled
; the run would fail at the stamp push.

@andiwand
andiwand marked this pull request as ready for review August 9, 2026 16:39
Base automatically changed from docs/changelog to main August 9, 2026 16:56
The `releases` branch existed to hold the stamp commit, and cost tag
reachability: since the train, tags sit on commits main never sees, so
`git describe main` is stuck at v6.1.0 and `release.py version` cannot answer
from main.

Dispatch is now the only trigger, the stamp goes to main, and `release.py cut`
heads the entries with the version - so the changelog needs no manual cut and
nothing has to be synced between branches. `contents: write` is scoped to the
job that pushes, and the other workflows drop the release-branch exclusion.

Pushing to main needs the GitHub Actions app on the ruleset's bypass list,
which is not in place yet.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFcWjZhdxeWLE5Abg4qUex
@andiwand
andiwand force-pushed the ci/release-from-main branch from 316f805 to b67086c Compare August 9, 2026 16:59
@andiwand
andiwand marked this pull request as draft August 9, 2026 16:59
@andiwand
andiwand marked this pull request as ready for review August 9, 2026 17:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b67086cca8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/release.yml
@andiwand
andiwand enabled auto-merge (squash) August 9, 2026 17:14
@andiwand
andiwand merged commit 9ed4ec4 into main Aug 9, 2026
85 checks passed
@andiwand
andiwand deleted the ci/release-from-main branch August 9, 2026 17:19
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