Repository navigation
feat(update): a nightly channel, built from main on every merge - #278
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a nightly channel for the team and anyone who wants main before it's released.
.github/workflows/nightly.ymlruns at 02:00 UTC (2am in winter, 3am in BST since GitHub cron has no time zones) and from Actions → Run workflow when you want one now. A scheduled run skips the night if thenightlytag already points at main's head. It moves the tag to the commit, keeps one rollingnightlypre-release (never marked latest), then builds, signs and notarizes both arches the same way release.yml does and swaps that arch's files on the release<next>-nightly.<n>. next comes from release-please's open release PR (it recomputes that from the commits on every push, so right now it'd be 2.10.1), or a patch bump of the last release if there isn't one, and n is main's commit count so a later build always has the bigger number. It's in the artifact name (stack-nudge-2.10.1-nightly.812-macos-arm64.tar.gz) and stamped into Info.plist asStackNudgeNightlyBuildSTACKNUDGE_UPDATE_CHANNEL). On Nightly the update check and the updater read the nightly release instead of/releases/latestand offer a higher build number, and a release build gets moved onto nightlies of a later version. Semver order throughout, so 2.10.1-nightly.n sits before 2.10.1: switching back to Stable waits for the release your nightly was leading up to rather than stepping back. Changing it re-checks straight away2.10.1 (nightly 812)and the post-update screen pulls the nightly release's notesNobody on Stable, or on any app from before this, can be offered a nightly: they only ever read
/releases/latest, which leaves pre-releases out.The signing and notarize steps are copied from release.yml rather than shared, so the stable path is untouched by this. Once a few nightlies have gone through it'd be worth pulling both into one reusable workflow. Worth kicking one off by hand after merging rather than waiting for 2am, since that's the first real run of the tag and release creation.
Tests: new
UpdateChannelTests(version parsing, reading a nightly from its arch's artifact, what each channel offers in both directions, the setting) plus the settings, extension installer and updater suites pass. actionlint is clean on the workflow.