From b5f0dd861e446cb0926669e14412f8a49dd055a4 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Fri, 25 Apr 2025 17:01:13 +0200 Subject: [PATCH] [ci] Use dots in release candidtate versions, as per SemVer (#901) This change also fixes `finalizing release` workflow https://github.com/cozystack/cozystack/pull/890#issuecomment-2830525103 ## Summary by CodeRabbit - **Chores** - Updated release tag validation to require a dot between "rc" and the number (e.g., `v0.31.5-rc.1` instead of `v0.31.5-rc1`). - Adjusted error messages to reflect the new release tag format. (cherry picked from commit 108fc647ea4bea1b5758c7d36e6224fc67d1462e) Signed-off-by: Timofei Larkin --- .github/workflows/pull-requests-release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-requests-release.yaml b/.github/workflows/pull-requests-release.yaml index bc955f55..e51e766e 100644 --- a/.github/workflows/pull-requests-release.yaml +++ b/.github/workflows/pull-requests-release.yaml @@ -136,13 +136,13 @@ jobs: uses: actions/github-script@v7 with: script: | - const tag = '${{ steps.get_tag.outputs.tag }}'; // v0.31.5-rc1 - const m = tag.match(/^v(\d+\.\d+\.\d+)(-rc\d+)?$/); + const tag = '${{ steps.get_tag.outputs.tag }}'; // v0.31.5-rc.1 + const m = tag.match(/^v(\d+\.\d+\.\d+)(-rc\.\d+)?$/); if (!m) { - core.setFailed(`❌ tag '${tag}' must match 'vX.Y.Z' or 'vX.Y.Z-rcN'`); + core.setFailed(`❌ tag '${tag}' must match 'vX.Y.Z' or 'vX.Y.Z-rc.N'`); return; } - const version = m[1] + (m[2] ?? ''); // 0.31.5‑rc1 + const version = m[1] + (m[2] ?? ''); // 0.31.5‑rc.1 const isRc = Boolean(m[2]); core.setOutput('is_rc', isRc); const outdated = '${{ steps.semver.outputs.comparison-result }}' === '<';