Tag and release from a version bump that reaches main - #67
Conversation
The last manual step in the chain was pushing a vX.Y.Z tag after main synced. Forgetting it is silent: main carries a bumped version, no release exists, and nothing reports anything. `Tag release` runs after `Sync main`, reads the version from main's pubspec, and does nothing at all unless there is no matching tag — which is the case for most merges, so the quiet path is the common one. The version is the trigger because bumping it is already a considered decision made in a reviewed pull request; this carries that decision out rather than making a new one. The part worth knowing: GitHub suppresses workflow triggers for pushes made with GITHUB_TOKEN, so the pushed tag cannot start `Release` the way a hand-pushed one does. Left implicit, the tag would land with no release built and no failure reported — the exact silent gap this is meant to close. `Release` therefore gained a `workflow_call` entry point and is invoked explicitly, and the suppression becomes useful rather than harmful: the two entry points cannot race to create the same release. A hand-pushed tag still works unchanged. `Release` also takes the tag as an input now, so under `workflow_call` it checks out the tag rather than the caller's ref, which would otherwise be whatever main happened to be by then. No new secrets: a PAT would have worked too, at the cost of an expiry that fails this the same silent way.
Tags here are v<flutter>-tvos.<cli> — v3.47.1-tvos.1.7.0 — and every release since 3.41.4 follows it. Using the CLI version alone drops the one thing the scheme exists to record: which Flutter release these artifacts and this CLI go together with. The two move independently, so the pairing is not derivable after the fact. Only the commit is pinned in the repository, so the Flutter version is resolved back from it against flutter/flutter's tags rather than duplicated into a second file that could drift from the pin. A pin that no release tag points at is a hard failure: it means the pair cannot be named, and guessing would produce a tag that misdescribes what shipped.
PR #67's branch, folded in here so the version bump this branch carries and the workflow that acts on it land together rather than in an order that decides whether 1.8.0 releases.
|
Folded into #72 rather than merged on its own. Both commits here ( The reason for combining them: #72 bumps the version to 1.8.0, and this workflow is what turns a version bump reaching They merged clean — both touch The |
The last manual step in the release chain was pushing the tag after
mainsynced. Forgetting it is silent:maincarries a bumped version, no release exists, and nothing reports anything.Tag releaseruns afterSync main, reads the version frommain's pubspec, and does nothing unless there is no matching tag — which is the case for most merges, so the quiet path is the common one. The version is the trigger deliberately: bumping it is already a considered decision made in a reviewed pull request, and this carries that decision out rather than making a new one. Nothing here decides whether to release.The part that would have made it silently useless
GitHub suppresses workflow triggers for pushes made with
GITHUB_TOKEN, so a tag pushed by a workflow cannot startReleasethe way a hand-pushed one does. Left implicit, the tag would land on the repository with no release built and no failure reported — the exact gap this exists to close, reintroduced one level up.So
Releasegained aworkflow_callentry point and is invoked explicitly. The suppression then works in our favour: the two entry points cannot race to create the same release. A hand-pushed tag still behaves exactly as before.Releasealso takes the tag as an input now. Underworkflow_callthe caller's ref is checked out by default —main— which would build whatevermainhad become by then rather than the tagged commit.No new secrets. A PAT would also have worked, at the cost of an expiry that fails this the same silent way.
Tag naming
Tags here are
v<flutter>-tvos.<cli>(v3.47.1-tvos.1.7.0), as every release since 3.41.4 has been. The CLI version alone drops the one thing the scheme records — which Flutter release the CLI and artifacts pair with — and the two move independently, so the pairing is not recoverable afterwards.Only the Flutter commit is pinned in the repo, so the version is resolved back from it against
flutter/flutter's tags rather than duplicated into a second file that could drift from the pin. A pin with no release tag pointing at it is a hard failure: it means the pair cannot be named, and guessing would produce a tag that misdescribes what shipped.Verified against the current tree: pin
6655482eresolves to3.47.1, pubspec reads1.7.0, and the composed tag isv3.47.1-tvos.1.7.0— the tag 1.7.0 actually shipped under.What happens when this lands
It runs for the first time on its own merge, finds
mainat 1.7.0 withv3.47.1-tvos.1.7.0already present, and exits without doing anything — which is the behaviour to expect from most merges, and a harmless first exercise.