Skip to content

feat: auto-create updater server PR on release#85

Merged
skjnldsv merged 11 commits into
mainfrom
feature/auto-updater-pr
Jun 8, 2026
Merged

feat: auto-create updater server PR on release#85
skjnldsv merged 11 commits into
mainfrom
feature/auto-updater-pr

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds archive signing (openssl dgst -sha512) to the build workflow
  • Old release script uploads .sig files to GitHub release (nextcloud-gmbh/release-script#336)
  • New update-updater-server.sh script creates a PR to nextcloud-releases/updater_server with config + test updates
  • New release-updater.yml reusable workflow (manually triggerable with dry-run)
  • Wired into release.yml as a job after build
  • 8 snapshot tests covering all release types + deploy auto-calculation

Companion PRs

  • nextcloud-gmbh/release-script#336 -- old release script uploads .sig files to GitHub release

Release types handled

Release type Example What changes
Patch release v33.0.6 Replace version + sig in stable/beta features, update latest
RC bump v34.0.0rc6 Replace in beta features + latest only
Beta bump v34.0.0beta2 Same as RC bump, tests "beta N" format
Beta to RC v34.0.0rc1 Cross-modifier transition (beta 5 to RC1)
First stable v34.0.0 Convert RC to stable in beta, append new stable scenarios
First pre-release v35.0.0beta1 Add major to major_versions.json, append beta scenarios

Deploy percentage

Auto-calculated from version (override with --deploy N):

  • .0.0 (first stable) = 30%
  • .0.1 (first patch) = 70%
  • .0.2+ = 100%

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)

Scenario Tests
rc-bump RC5 to RC6
beta-bump beta 1 to beta 2 (lowercase + space format)
beta-to-rc beta 5 to RC1 (cross-modifier transition)
patch-release 33.0.5 to 33.0.6
patch-release-01 .0.1 auto-deploy 70%
patch-release-02 .0.2 auto-deploy 100%
first-stable RC to stable, auto-deploy 30%, new stable scenarios
first-beta New major pre-release, new beta scenarios

skjnldsv added 2 commits June 7, 2026 23:12
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>
@skjnldsv skjnldsv self-assigned this Jun 7, 2026
@skjnldsv skjnldsv added the enhancement New feature or request label Jun 7, 2026
skjnldsv added 9 commits June 7, 2026 23:24
- 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>
@skjnldsv skjnldsv merged commit 0bf15f4 into main Jun 8, 2026
1 check passed
@skjnldsv skjnldsv deleted the feature/auto-updater-pr branch June 8, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

1 participant