Skip to content

Release: build only from a green main commit; free disk on Linux runners - #39

Merged
MHohlios merged 1 commit into
mainfrom
wiffletree/release-build-only-from-a-green-main-commit-free
Nov 4, 2026
Merged

MHohlios merged 1 commit into
mainfrom
wiffletree/release-build-only-from-a-green-main-commit-free

Conversation

@MHohlios

@MHohlios MHohlios commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Releases kept failing before anything was built. v0.1.0 stopped on a flaky test, and v0.1.1 ran out of disk on the Ubuntu runner ("No space left on device") during the release's own re-run of CI. Both times GitHub showed an empty "Latest" release. A release now builds only from a commit whose CI already passed on main, and Linux runners free disk first. Linear: VYT-265.

Changes

  • Gate instead of a CI re-run: release.yml no longer calls ci.yml. A new gate job runs scripts/require-green-ci.sh "$GITHUB_SHA", which passes only when ci.yml has a completed, successful push run on main for that exact commit. Otherwise it stops before any build with "CI hasn't passed on main for . Wait for it to pass (or re-run it), then delete and push the tag again." The macOS, Windows and Linux builds need the gate. The tag-format and on-main checks are unchanged. ci.yml's workflow_call trigger is gone.
  • Disk: ci.yml's build job (on Linux) and release.yml's linux job first remove unused preinstalled software (.NET, Android, GHC, CodeQL, Docker images) and print free space before and after.
  • Release last: only the publish job creates or updates the GitHub Release, after every build succeeds, and it attaches to an existing draft. Asset names are unchanged.
  • Docs: docs/releasing.md says to tag only a green main commit, to push the tag (or save a draft, never publish before the builds land), what to do when the gate stops, and how to remove a failed tag and its empty release.

Checks

  • actionlint and shellcheck pass.
  • The gate script was run against a fake gh for success, failure, in progress, cancelled, missing, and a failed run followed by a green re-run. A read-only real query for 6fc7cb1 found its green run on main.
  • The gate and disk steps first run for real on the next tag.

Follow-ups

  • docs/ci.md still says the release runs ci.yml first; VYT-264 rewrites that page and drops it (docs/ci.md:10).

Reviewed with Wiffletree: 1 full review and 0 re-checks, 1 round (Tests, Claude, Style)

…inux runners

The release no longer re-runs CI, where a full disk (v0.1.1) or a flaky
test (v0.1.0) failed it. A first job checks that CI passed on main for the
tagged commit, and every build waits for it. The CI and Linux release builds
free the runner's unused preinstalled software first. docs/releasing.md
explains the gate and how to remove a failed tag.
@MHohlios
MHohlios merged commit c3a193e into main Nov 4, 2026
5 checks passed
@MHohlios
MHohlios deleted the wiffletree/release-build-only-from-a-green-main-commit-free branch November 4, 2026 01:45
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