Skip to content

Commit 095f457

Browse files
committed
git tag这次一定成功!
1 parent bf9345f commit 095f457

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VUE_APP_GITTAG=v0.9.3
1+
VUE_APP_GITTAG=v0.9.5

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ jobs:
3131
with:
3232
fetch-depth: 0
3333

34+
35+
- name: Get git tag
36+
uses: olegtarasov/get-tag@v2.1
37+
id: tagName
38+
3439
- name: Build project
3540
run: |
3641
chmod +x build.sh
37-
./build.sh
42+
./build.sh ${{ steps.tagName.outputs.tag }}
3843
3944
- name: Upload
4045
uses: actions/upload-artifact@v2

build.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ importpath="github.com/scutrobotlab/asuwave/helper"
44
build_prefix="asuwave_"
55
os_list=("linux" "darwin" "windows")
66
arch_list=("amd64" "arm64")
7-
gittag=`git describe --tags --abbrev=0`
8-
echo ${gittag}
7+
if [ -v $1 ];
8+
then
9+
echo "No"
10+
gittag=`git describe --tags --abbrev=0`
11+
else
12+
echo "Yes"
13+
gittag=$1
14+
fi
915

10-
sed -i "s/^VUE_APP_GITTAG=.*/VUE_APP_GITTAG=${gittag}/g" .env
16+
echo ${gittag}
17+
sed -i "s/VUE_APP_GITTAG=.*/VUE_APP_GITTAG=${gittag}/g" .env
1118
cat .env
1219

1320
npm ci

0 commit comments

Comments
 (0)