From e585f73c8cece87656ac7b17753985dd61972951 Mon Sep 17 00:00:00 2001 From: Newton Der Date: Mon, 8 Dec 2025 10:53:48 -0800 Subject: [PATCH 1/2] Allow for release candidate version numbers like x.y.z-rc.N --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 971445f..506d8dc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,8 +22,8 @@ jobs: - name: Validate tag run: | - if ! echo "$VERSION_NUM" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then - echo "Tag $VERSION_NUM does not follow semantic version pattern (x.y.z). Skipping release." + if ! echo "$VERSION_NUM" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$'; then + echo "Tag $VERSION_NUM does not follow semantic version pattern (x.y.z or x.y.z-rc.N). Skipping release." exit 78 # neutral exit code fi echo "Tag $VERSION_NUM follows valid semantic version pattern" From f7679f9e8aeea404cdd2c447bbf8f7b92bb66ad9 Mon Sep 17 00:00:00 2001 From: VictorPaiu Date: Wed, 10 Dec 2025 12:02:05 +0100 Subject: [PATCH 2/2] Add pre-release tag for release candidates --- .github/workflows/release.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 506d8dc..8c5cea0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -90,6 +90,13 @@ jobs: - name: Create GitHub release run: | + # Check if this is a release candidate + PRERELEASE_FLAG="" + if echo "$VERSION_NUM" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$'; then + PRERELEASE_FLAG="--prerelease" + echo "Detected release candidate version, will mark as prerelease" + fi + # Check if release already exists. Needed when release created via new release in guthub ui if gh release view "$VERSION_NUM" > /dev/null 2>&1; then echo "Release for tag $VERSION_NUM already exists, uploading additional assets..." @@ -98,7 +105,8 @@ jobs: echo "Creating new release for tag $VERSION_NUM..." gh release create "$VERSION_NUM" ./*.tar.gz \ --title "Release $VERSION_NUM" \ - --notes "Release $VERSION_NUM" + --notes "Release $VERSION_NUM" \ + $PRERELEASE_FLAG fi handle-failures: name: Handle Failures