File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,18 @@ jobs:
28
28
- name : Install dependencies
29
29
run : npm install
30
30
31
- # 获取 tag 的版本类型(alpha 或 beta )
31
+ # 获取 tag 的版本类型(仅支持 正式版和beta版 )
32
32
- name : Determine release tag
33
33
id : determine_tag
34
34
run : |
35
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
36
+ if [[ "$TAG" =~ -beta ]]; then
37
+ echo "::set-output name=tag::beta"
38
+ elif [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
40
39
echo "::set-output name=tag::latest"
40
+ else
41
+ echo "Unsupported version detected. Terminating."
42
+ exit 1
41
43
fi
42
44
# # 打包
43
45
# - name: Build Packages
You can’t perform that action at this time.
0 commit comments