Skip to content

Commit 1fe5c4b

Browse files
authored
Update go.yml
1 parent 38690b2 commit 1fe5c4b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/go.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Build and Release Windows EXE
22

33
on:
44
push:
5-
branches:
6-
- main
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
77

88
jobs:
99
build:
@@ -18,6 +18,9 @@ jobs:
1818

1919
- name: Check out code
2020
uses: actions/checkout@v2
21+
22+
- name: Set version env
23+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2124

2225
- name: Build Windows EXE
2326
run: GOOS=windows GOARCH=amd64 go build -o tallycli.exe
@@ -28,8 +31,8 @@ jobs:
2831
env:
2932
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3033
with:
31-
tag_name: ${{ github.ref }}
32-
release_name: Release ${{ github.ref }}
34+
tag_name: ${{ env.RELEASE_VERSION }}
35+
release_name: Release ${{ env.RELEASE_VERSION }}
3336
draft: false
3437
prerelease: false
3538

0 commit comments

Comments
 (0)