Skip to content

Inline the release-tag step - #51

Merged
LaStrada merged 3 commits into
mainfrom
ci/inline-the-release-tag-step
Aug 10, 2026
Merged

Inline the release-tag step#51
LaStrada merged 3 commits into
mainfrom
ci/inline-the-release-tag-step

Conversation

@LaStrada

Copy link
Copy Markdown
Member

Description ✏️

touchlab/ga-update-release-tag declares the Node 20 runtime, which GitHub removes from the runners in September. There is no newer tag, no fork, and its last commit was in 2024 — nothing to upgrade to. It ran six git commands, so those are now in the workflow directly.

Two deliberate changes while inlining:

  • git add .git add -f Package.swift. The blanket add would commit anything else the build left in the working tree, and it skipped the manifest entirely when that path was ignored — which is exactly how 0.3.0 ended up published with no manifest.
  • An explicit bot identity on the commit, instead of whatever the runner happened to be called.

The throwaway build-<version> branch is kept. It is never pushed, and it is what keeps the generated manifest on the tag rather than on main.

Screenshots / Recordings 📷

How to Test 🐛

The step only runs during publish. The sequence was verified locally against a scratch repository, including the case where Package.swift is gitignored: the tag ends up pointing at the manifest commit, the manifest is present on the tag, and the default branch is untouched.

References 🔗

touchlab/ga-update-release-tag declares the Node 20 runtime, which leaves the
runners in September. It has no newer tag, no fork, and its last commit was in
2024, so there is nothing to upgrade to. It ran six git commands; those are now
in the workflow.

Two changes while inlining. `git add .` becomes `git add -f Package.swift`: the
blanket add would commit anything else the build left in the tree, and it
skipped the manifest entirely when the path was ignored, which is what produced
a 0.3.0 release with no manifest. And the commit now has an explicit bot
identity rather than whatever the runner happened to be called.

The throwaway build-<version> branch is kept — it is what keeps the generated
manifest on the tag and off the default branch.
@LaStrada
LaStrada requested review from a team as code owners August 10, 2026 13:06
An unchanged manifest leaves nothing staged, and git commit exits non-zero on
that. Under set -e the job would stop there — after the release already exists
— leaving the tag on a commit without the manifest, which is the state that
made 0.3.0 unusable.

The generated file also gets checked with -s rather than -f, so a zero-byte
manifest from a partial failure can't pass as valid.
Placed before the release is created, so it fails while nothing has been
produced yet. Once the release exists, a failure further down leaves the
release, the tag and possibly the Maven artifacts behind — and those cannot all
be cleanly withdrawn, so republishing the same version is not a recovery path.
The message says what to do instead.

This is what 0.3.0 needed: it failed after publishing, and the fix was 0.3.1
rather than any attempt to reuse the version.
@LaStrada
LaStrada merged commit 8c480e1 into main Aug 10, 2026
2 checks passed
@LaStrada
LaStrada deleted the ci/inline-the-release-tag-step branch August 10, 2026 21:14
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