We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6492726 commit 35ae836Copy full SHA for 35ae836
.github/workflows/relese.yml
@@ -28,16 +28,18 @@ jobs:
28
- name: Install dependencies
29
run: npm install
30
31
- # 获取 tag 的版本类型(alpha 或 beta)
+ # 获取 tag 的版本类型(仅支持 正式版和beta版)
32
- name: Determine release tag
33
id: determine_tag
34
run: |
35
TAG=$(echo "${GITHUB_REF}" | sed 's/refs\/tags\/\(.*\)/\1/')
36
- PRERELEASE=$(echo $TAG | sed -n 's/.*-\(alpha\|beta\|rc\).*/\1/p')
37
- if [ -n "$PRERELEASE" ]; then
38
- echo "::set-output name=tag::$PRERELEASE"
39
- else
+ if [[ "$TAG" =~ -beta ]]; then
+ echo "::set-output name=tag::beta"
+ elif [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
40
echo "::set-output name=tag::latest"
+ else
41
+ echo "Unsupported version detected. Terminating."
42
+ exit 1
43
fi
44
# # 打包
45
# - name: Build Packages
0 commit comments