ci(release): support prerelease self-host image tags - #2610
Conversation
The release-orb workflow accepted strict X.Y.Z semver only, while a beta/RC posture needs a prerelease image tag (orb-v0.1.0-rc.1 / orb-v0.1.0-beta.1) rather than an overclaiming stable orb-v0.1.0. Widened the "Resolve version" step's regex to accept an optional -rc.N / -beta.N suffix and compute a new `prerelease` output. Two downstream steps consume it: - "Resolve image tags" (new): builds the docker/metadata-action tags list in bash instead of a static multi-line literal, so `latest` is only included for a stable version -- a prerelease build is pushed under its own version tag + sha only, never latest. - "GitHub Release": passes --prerelease --latest=false to gh release create/edit only when PRERELEASE=true, so the release is visibly marked prerelease and never becomes the repo's "Latest release". Stable release behavior (both flags omitted) is unchanged. Documented the prerelease tag policy on the self-hosting-releases docs page: which tag beta testers should pull, and that latest/GitHub Release marking stays untouched for stable tags. 15 new tests execute the ACTUAL bash extracted from the committed workflow YAML against a real GITHUB_OUTPUT file (not a re-derived copy), covering stable/rc/beta/workflow_dispatch acceptance, rejection of malformed versions and unsupported prerelease kinds (e.g. -alpha), and the tags/GitHub-Release steps' prerelease branching. Updated one pre-existing assertion in selfhost-sentry-release.test.ts that string-matched the old inline tags literal. Closes #1937
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-02 12:53:51 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2610 +/- ##
=======================================
Coverage 96.02% 96.02%
=======================================
Files 233 233
Lines 26077 26077
Branches 9474 9474
=======================================
Hits 25041 25041
Misses 425 425
Partials 611 611 🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 7245db3 | Commit Preview URL Branch Preview URL |
Jul 02 2026, 01:08 PM |
Summary
release-orbworkflow accepted strictX.Y.Zsemver only, while a beta/RC posture needs a prerelease image tag (orb-v0.1.0-rc.1/orb-v0.1.0-beta.1) rather than an overclaiming stableorb-v0.1.0.Scope
.github/workflows/release-selfhost.yml:-rc.N/-beta.Nsuffix and compute a newprereleaseoutput.docker/metadata-actiontags list in bash instead of a static multi-line literal, solatestis only included for a stable version — a prerelease build is pushed under its own version tag + sha only, neverlatest.--prerelease --latest=falsetogh release create/editonly whenPRERELEASE=true, so the release is visibly marked prerelease and never becomes the repo's "Latest release". Stable release behavior (both flags omitted) is unchanged.apps/gittensory-ui/src/routes/docs.self-hosting-releases.tsx— documented the prerelease tag policy: which tag beta testers should pull, and thatlatest/GitHub Release marking stays untouched for stable tags.test/unit/release-selfhost-prerelease.test.tsexecute the ACTUAL bash extracted from the committed workflow YAML against a realGITHUB_OUTPUTfile (not a re-derived copy), covering stable/rc/beta/workflow_dispatchacceptance, rejection of malformed versions and unsupported prerelease kinds (e.g.-alpha), and the tags/GitHub-Release steps' prerelease branching. Updated one pre-existing assertion intest/unit/selfhost-sentry-release.test.tsthat string-matched the old inline tags literal.Validation
npx vitest run test/unit/release-selfhost-prerelease.test.ts test/unit/selfhost-sentry-release.test.ts— 17/17 passingnpm run actionlint— cleannpm run typecheck— cleannpm run test:ci— full local gate greennpm audit --audit-level=moderate— 0 vulnerabilitiesSafety
X.Y.Ztag still resolvesprerelease=false, still moveslatest, and bothgh releasecalls receive an emptyPRERELEASE_ARGSarray (no flag change)..github/workflows/**, a guarded path — expect this to be held for manual owner merge rather than auto-merged.Closes #1937