Skip to content

ci: publish a beta of every push to main and start stable releases by hand - #23

Merged
M4n0x merged 3 commits into
mainfrom
ci/beta-releases
Oct 16, 2026
Merged

M4n0x merged 3 commits into
mainfrom
ci/beta-releases

Conversation

@M4n0x

@M4n0x M4n0x commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Problem

Fixes #3. Releases have no DMG, and every push to main with a feat or fix commit publishes a stable release straight away, so nothing is tested before it reaches everyone.

Changes

  • Beta (ci.yml, new beta job): after the tests pass on a push to main, a semantic-release dry run finds the next version (verifyReleaseCmd writes it to .next-version). The job builds the DMG as <next>-beta.<run number> and publishes it with gh release create --prerelease. It commits nothing. With no releasable commits since the last stable release, there is no beta.
  • Stable (release job): runs only from Actions → CI → Run workflow on main. It fails unless a beta tag points at the newest commit, then runs semantic-release as before, now building the DMG in prepareCmd and attaching it to the release. It has its own concurrency group, so a newer push can't cancel it while it waits. A last step fails the run if no stable tag was made, because semantic-release exits successfully without releasing when main moves during the run.
  • Build number (set-version.sh): takes the build number as a second argument, writes it to CFBundleVersion, and rejects anything but one to three dot-separated integers. Both jobs pass github.run_number, which only goes up within this workflow, so a stable build always numbers higher than the betas before it. Check for and install updates in the app, on a stable or beta channel #22 relies on that.
  • Docs: "Commits and releases" in CONTRIBUTING.md describes both channels, and the README gets a "Download a release" section with the Gatekeeper step.

#3's open questions stay at these defaults until they're decided: a beta on every push, ad-hoc-signed DMGs, Apple silicon only. No new secrets or settings are needed.

Testing

  • swift test: all 102 tests pass, including the new set-version.sh cases. The version and build number are written separately, and 1.2.3-beta.4, 1.2.3.4 or a plist path as the build number is rejected with the plist untouched.
  • A semantic-release rehearsal against a throwaway bare remote, using this config without the GitHub plugin:
    • with only ci/docs commits since v0.4.0, nothing is written to .next-version;
    • after a feat: commit, the dry run exits 0, skips prepare and publish, and writes 0.5.0;
    • with a v0.5.0-beta.7 tag on main and a later fix:, the last release is still v0.4.0 and the next version 0.5.0, so beta tags don't change stable versions.
  • The beta check and the stable-tag check against tagged and untagged commits and sample tag lists.
  • Not testable before merge: the beta and release jobs themselves, gh release create, and the DMG on a clean Mac. Merging this publishes nothing, because main has only ci, docs and chore commits since v0.4.0. The first beta comes with the next feat: or fix: merge. After it, start a stable run, check plutil -p on the mounted DMG's Info.plist, and try the "Open Anyway" step on another Mac.

Not in this pull request:

  • The triage skill treats any tag as a release. Once betas exist, it should tell vX.Y.Z-beta.N tags from stable ones.
  • hdiutil create occasionally fails on GitHub's macOS runners. A retry would go in package.sh.

Merging

A merge commit or a rebase merge. None of the commits (build, ci, docs) makes a release.

Claude Opus 5.5 via Claude Code

M4n0x added 3 commits October 16, 2026 06:28
CFBundleVersion takes only one to three dot-separated integers, so a prerelease version such as
0.5.0-beta.3 can't go there. set-version.sh now takes the build number as its own argument and
rejects anything else. Releases pass the CI run number, which only goes up.
… hand

Every push to main with releasable commits publishes the next version as a beta prerelease with
the DMG, such as v0.5.0-beta.42. A semantic-release dry run finds the version, and the beta
commits nothing.

A stable release no longer runs on every push. A maintainer starts it from Actions, and it runs
only on a commit that already shipped as a beta, so stable ships what beta users have run. It
attaches the DMG and has its own concurrency group, so a newer push can't cancel it while it waits.
A run that ends without a stable tag fails, because semantic-release exits successfully when main
moved during the run.
@M4n0x
M4n0x requested a review from Seb-GRAF as a code owner October 16, 2026 04:29
@M4n0x
M4n0x merged commit 8585982 into main Oct 16, 2026
4 checks passed
@M4n0x
M4n0x deleted the ci/beta-releases branch October 16, 2026 04:33
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

M4n0x added a commit that referenced this pull request Nov 8, 2026
GitHub doesn't link #23 in repository files, so every reference is a link now. A beta ships when
the app changed since the newest release, which a docs-only push can still do for a pending change,
and only builds since 0.9.0 skip what a newer release wrote.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build the DMG in CI, publish betas from main and promote stable by hand

1 participant