Skip to content

Commit df2fc21

Browse files
committed
fix: mark beta GitHub releases as prereleases
1 parent e0bfa3b commit df2fc21

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/publish-npm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,13 @@ jobs:
171171
GH_TOKEN: ${{ github.token }}
172172
TARBALL: ${{ steps.pack.outputs.tarball }}
173173
run: |
174+
PRERELEASE_ARGS=()
175+
if [[ "$RELEASE_TAG" == *-* ]]; then
176+
PRERELEASE_ARGS+=(--prerelease)
177+
fi
174178
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
175179
gh release upload "$RELEASE_TAG" "$TARBALL" "$TARBALL.sha256" artifacts/*.tgz --clobber
176180
else
177181
gh release create "$RELEASE_TAG" "$TARBALL" "$TARBALL.sha256" artifacts/*.tgz \
178-
--verify-tag --generate-notes --title "$RELEASE_TAG"
182+
--verify-tag --generate-notes --title "$RELEASE_TAG" "${PRERELEASE_ARGS[@]}"
179183
fi

0 commit comments

Comments
 (0)