Skip to content

ci(release): check_release.sh / prepare_beta.sh; version-bump keeps betas; release branches checked in CI (#1498) - #1709

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
ci/release-check-scripts
Oct 18, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
ci/release-check-scripts

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1498. Part of the Beta channel epic #1499.

Cutting a release needs the tag, pubspec and CHANGELOG to agree, and until now a mismatch showed up only in the Publish GitHub Release job after the tag was pushed.

scripts/release/check_release.sh <tag> [--no-tag-check] fails with a line per problem unless:

  • the tag is SemVer (X.Y.Z or X.Y.Z-<letters, digits, dots>, an optional leading v);
  • pubspec's version without +build equals the tag;
  • a pre-release has a numeric build number in pubspec;
  • CHANGELOG.md has ## [<version>] (checked with the same extract-changelog-section.sh the workflow uses);
  • the tag does not exist yet (skipped with --no-tag-check).

It then prints what the Release workflow will do: a pre-release offered only on Beta with AUR and APT / DNF skipped (#1492), or a stable release made latest.

scripts/release/prepare_beta.sh X.Y.Z N sets version: X.Y.Z-beta.N+<build + 1> and puts a dated ## [X.Y.Z-beta.N] heading right under ## [Unreleased], so what was unreleased becomes the beta's notes. It prints the check / commit / tag commands and commits nothing.

Workflows

  • version-bump.yml: when the merged pubspec carries a pre-release version, it is left as is (a notice instead of the bump). Before, 0.5.0-beta.2+7 merged into main became 0.5.1+8.
  • ci.yml: a Release branch check job runs check_release.sh for the pubspec version on pull requests from release/* branches. It is a separate job, not part of the required Run Tests.
  • release.yml → version-hint: runs the same checks with --no-tag-check and turns problems into a warning (the tag is already pushed there).

Tests (test/packaging/release_scripts_test.dart, in temporary git repositories): a prepared beta passes and is announced as a pre-release; a missing CHANGELOG section is named; pubspec / tag mismatch; a beta without a build number; non-SemVer tags; an existing tag (and --no-tag-check); a stable tag announced as latest; prepare_beta.sh sets the version, moves Unreleased under the beta heading and then passes the check; it refuses an existing section and bad arguments.

… a beta version; release branches are checked in CI (#1498)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request P3 Low priority / Polish & Enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant