From 60f973d6f806e1d09488dac605f51451836b8467 Mon Sep 17 00:00:00 2001 From: rfs Date: Mon, 19 Oct 2026 10:02:46 +0100 Subject: [PATCH] ci(release): date-based version bumps (YYYY.Q.P), quarterly model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dispatch bump logic did semver (major/minor/patch), which conflicts with the documented date-based quarterly model (YYYY.R). A "major" bump of 2026.3.0 produced 2027.0.0; a "minor" produced 2026.4.0 — inconsistent and confusing. Now: - release_type gains `point` (YYYY.Q.P -> .P+1) and `quarter` (YYYY.Q -> next quarter, rolling the year after Q4: 2026.4.x -> 2027.1.0). The old patch/minor/major labels are kept as aliases (patch=point, minor/major=quarter). - Bump math parses YEAR.QUARTER.PT and handles the Q4->Q1 year rollover and 2-field legacy tags (e.g. 2026.2 -> quarter -> 2026.3.0). Verified with 8 unit cases incl. year rollover, legacy tags, and aliases. RELEASES.md updated; actionlint clean. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 29 +++++++++++++++++++++-------- RELEASES.md | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a993b9..3050368 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,12 @@ on: type: choice options: - nightly # build + push to SF rolling/, update rolling pre-release - - patch # bump x.y.Z → x.y.Z+1, create versioned release - - minor # bump x.Y.z → x.Y+1.0, create versioned release - - major # bump X.y.z → X+1.0.0, create versioned release + - point # YYYY.Q.P -> YYYY.Q.(P+1) (bug/security point release) + - quarter # YYYY.Q.P -> YYYY.(Q+1).0, and YYYY.4.x -> (YYYY+1).1.0 + # Back-compat aliases for the old semver labels: + - patch # alias of 'point' + - minor # alias of 'quarter' + - major # alias of 'quarter' build_flavor: description: 'Distro flavor to build' required: false @@ -126,13 +129,23 @@ jobs: else CURRENT="0.0.0" fi - IFS='.' read -r VER_MAJOR VER_MINOR VER_PATCH <<< "$CURRENT" + # Date-based YYYY.Q.P (Q = quarter 1-4, P = point release). + # YEAR and QUARTER come from the current version; PT from its 3rd + # field (0 if absent, e.g. an old "2026.2" tag). + IFS='.' read -r YEAR QUARTER PT <<< "$CURRENT" + PT="${PT:-0}" case "$RELEASE_TYPE" in - patch) VER_PATCH=$(( VER_PATCH + 1 )) ;; - minor) VER_MINOR=$(( VER_MINOR + 1 )); VER_PATCH=0 ;; - major) VER_MAJOR=$(( VER_MAJOR + 1 )); VER_MINOR=0; VER_PATCH=0 ;; + point|patch) + PT=$(( PT + 1 )) ;; + quarter|minor|major) + if [ "$QUARTER" -ge 4 ]; then + YEAR=$(( YEAR + 1 )); QUARTER=1 + else + QUARTER=$(( QUARTER + 1 )) + fi + PT=0 ;; esac - BUMPED="${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" + BUMPED="${YEAR}.${QUARTER}.${PT}" printf '%s\n' "$BUMPED" > VERSION git config user.email "github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" diff --git a/RELEASES.md b/RELEASES.md index 610815d..cb1bb2f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -91,7 +91,7 @@ Every release build generates a standard quartet of integrity assets: Releases are triggered automatically via `.github/workflows/release.yml`: 1. **Tag Push**: `git tag v2026.2 && git push origin v2026.2` -2. **Workflow Dispatch**: Triggers manual bump (`2026.1`, `2026.2`, `2026.3`, `2026.4`, or `nightly`) with flavor selector (`full` / `lite`). +2. **Workflow Dispatch**: Triggers manual date-based bump (`point` -> YYYY.Q.P+1, `quarter` -> next quarter with year rollover, or `nightly`) with flavor selector (`full` / `lite`). 3. **Multi-Mirror Synchronization**: - Pushes release assets and checksums to GitHub Releases. - Synchronizes ISO files and README documentation to SourceForge (`frs.sourceforge.net`).