Skip to content

Commit

Permalink
ci: only supports official and beta versions
Browse files Browse the repository at this point in the history
  • Loading branch information
freeshineit committed Nov 21, 2024
1 parent 6492726 commit 35ae836
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/relese.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ jobs:
- name: Install dependencies
run: npm install

# 获取 tag 的版本类型(alpha 或 beta
# 获取 tag 的版本类型(仅支持 正式版和beta版
- name: Determine release tag
id: determine_tag
run: |
TAG=$(echo "${GITHUB_REF}" | sed 's/refs\/tags\/\(.*\)/\1/')
PRERELEASE=$(echo $TAG | sed -n 's/.*-\(alpha\|beta\|rc\).*/\1/p')
if [ -n "$PRERELEASE" ]; then
echo "::set-output name=tag::$PRERELEASE"
else
if [[ "$TAG" =~ -beta ]]; then
echo "::set-output name=tag::beta"
elif [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::set-output name=tag::latest"
else
echo "Unsupported version detected. Terminating."
exit 1
fi
# # 打包
# - name: Build Packages
Expand Down

0 comments on commit 35ae836

Please sign in to comment.