feat: auto-create updater server PR on release#85
Merged
Conversation
Add archive signing to the build workflow and a new script that automatically creates a PR to nextcloud-releases/updater_server when a release is built. The script updates releases.json, regenerates config.php, and updates Behat feature files. Handles all release types: patch releases, RC/beta bumps, first stable of a new major, and first pre-release of a new major. Supports deploy percentage for staged rollouts and a dry-run mode for testing. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
.0.0 = 30%, .0.1 = 70%, .0.2+ = 100%. Can still be overridden with --deploy N. Workflow uses deploy=0 to signal auto-calculation. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- RC modifier: "RC6" not "RC 6" (no space within modifier) - beta modifier: "beta 5" (space before number, lowercase) - Fix grep -A2 to -A4 for latest.feature parsing - Convert multiline sed blocks to single-line for reliability Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Build workflow now uploads .sig files as release assets via gh release upload. The updater workflow downloads them from the release instead of relying on artifact passing or re-signing. This makes signatures permanent, auditable release artifacts and allows the updater workflow to run independently at any time. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
4 scenarios: rc-bump, patch-release, first-stable, first-beta. Each runs the script with --dry-run against fixture files and compares output to expected snapshots. Regenerate expected files with: bash .github/scripts/test-updater-script.sh --update Also adds --internal-version flag to skip curl in tests, and hardens replace_signature for mismatched line counts. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- Fix SC2001: use ${TAG#v} instead of sed
- Fix SC2034: remove unused vcheck variable
- Suppress SC2016: $OC_Version is intentionally literal
- Scope shellcheck to our scripts only (pre-existing issues in others)
- Add patch-release-01 scenario (auto-deploy 70%)
- Add patch-release-02 scenario (auto-deploy 100%)
- first-stable now tests auto-deploy 30% (no explicit --deploy)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
GitHub-hosted runners don't have a default git identity configured. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- beta-bump: "beta 1" → "beta 2" (lowercase + space modifier format) - beta-to-rc: "beta 5" → "RC1" (cross-modifier format transition) - Test runner now supports override/ dirs for scenario-specific base state Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Old release script handles .sig upload to GitHub releases. Commented out to avoid conflicts. Uncomment when old script retires. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Keep test runner with fixtures, not in .github/scripts/ which is for release scripts. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
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.
Summary
update-updater-server.shscript creates a PR tonextcloud-releases/updater_serverwith config + test updatesrelease-updater.ymlreusable workflow (manually triggerable with dry-run)release.ymlas a job after buildCompanion PRs
Release types handled
Deploy percentage
Auto-calculated from version (override with --deploy N):
Architecture
Old release script signs archives and uploads .sig files as GitHub release assets. The updater workflow downloads sigs from the release, runs the script, creates a PR to updater_server. No artifact coupling, can re-run independently.
The build workflow has a commented-out sig upload step (TODO) for when the old release script retires.
Snapshot tests (8 scenarios)