mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
ci(publish): a prerelease tag publishes only to an allow-listed dist-tag (#7963)
The publish job took the npm dist-tag from the pushed tag's suffix and refused only an exact "latest". A tag such as v1.2.3-LATEST.1, or one with a new suffix, still named its own dist-tag. The job's channel check now accepts only alpha, beta, rc, next, canary, hdr, native and desktop, matched exactly.
This commit is contained in:
@@ -457,6 +457,16 @@ jobs:
|
||||
echo "::error::v$VERSION is a prerelease and cannot publish to the latest dist-tag."
|
||||
exit 1
|
||||
fi
|
||||
# An allow-list, matched exactly, so no letter case or new suffix of a pushed tag names another dist-tag.
|
||||
if [ "$PRERELEASE" = "true" ]; then
|
||||
case "$DIST_TAG" in
|
||||
alpha | beta | rc | next | canary | hdr | native | desktop) ;;
|
||||
*)
|
||||
echo "::error::v$VERSION names the dist-tag \"$DIST_TAG\". Prereleases publish only to alpha, beta, rc, next, canary, hdr, native or desktop."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user