Skip to content

Commit f7679f9

Browse files
committed
Add pre-release tag for release candidates
1 parent 7edfe06 commit f7679f9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/release.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ jobs:
9090
9191
- name: Create GitHub release
9292
run: |
93+
# Check if this is a release candidate
94+
PRERELEASE_FLAG=""
95+
if echo "$VERSION_NUM" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$'; then
96+
PRERELEASE_FLAG="--prerelease"
97+
echo "Detected release candidate version, will mark as prerelease"
98+
fi
99+
93100
# Check if release already exists. Needed when release created via new release in guthub ui
94101
if gh release view "$VERSION_NUM" > /dev/null 2>&1; then
95102
echo "Release for tag $VERSION_NUM already exists, uploading additional assets..."
@@ -98,7 +105,8 @@ jobs:
98105
echo "Creating new release for tag $VERSION_NUM..."
99106
gh release create "$VERSION_NUM" ./*.tar.gz \
100107
--title "Release $VERSION_NUM" \
101-
--notes "Release $VERSION_NUM"
108+
--notes "Release $VERSION_NUM" \
109+
$PRERELEASE_FLAG
102110
fi
103111
handle-failures:
104112
name: Handle Failures

0 commit comments

Comments
 (0)