Skip to content

Commit 750372f

Browse files
committed
Mark prerelease versions as prerelease in GitHub Releases
Detects if the version string contains 'prerelease' and adds the --prerelease flag to gh release create accordingly.
1 parent 57b1beb commit 750372f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/bun-compile.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,16 @@ jobs:
131131
echo "::error::No version provided. Cannot create release."
132132
exit 1
133133
fi
134-
gh release create "v${VERSION}" \
135-
--title "v${VERSION}" \
136-
--generate-notes \
137-
artifacts/*
134+
if [[ "$VERSION" == *prerelease* ]]; then
135+
gh release create "v${VERSION}" \
136+
--title "v${VERSION}" \
137+
--generate-notes \
138+
--prerelease \
139+
artifacts/*
140+
else
141+
gh release create "v${VERSION}" \
142+
--title "v${VERSION}" \
143+
--generate-notes \
144+
artifacts/*
145+
fi
138146

0 commit comments

Comments
 (0)