Skip to content

Commit 3c63384

Browse files
committed
Trim github.ref to get only the tag
1 parent 709b5bb commit 3c63384

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
- name: checkout
1313
uses: actions/checkout@master
1414

15+
- name: set release version
16+
id: release_version
17+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
18+
1519
- name: set up Go
1620
uses: actions/setup-go@v1
1721
with:
@@ -27,7 +31,7 @@ jobs:
2731
run: |
2832
export PATH=$PATH:$(go env GOPATH)/bin
2933
mkdir -p build/bin
30-
gox -ldflags '-X main.version=${{ github.ref }}' \
34+
gox -ldflags '-X main.version=${{ steps.release_version.outputs.tag }}' \
3135
-output='build/bin/{{.Dir}}-{{.OS}}-{{.Arch}}' \
3236
-os='windows linux darwin freebsd' \
3337
-arch='amd64 386 arm arm64' \

0 commit comments

Comments
 (0)