Skip to content

Commit

Permalink
Trim github.ref to get only the tag
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkroh committed Dec 1, 2020
1 parent 709b5bb commit 3c63384
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
- name: checkout
uses: actions/checkout@master

- name: set release version
id: release_version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- name: set up Go
uses: actions/setup-go@v1
with:
Expand All @@ -27,7 +31,7 @@ jobs:
run: |
export PATH=$PATH:$(go env GOPATH)/bin
mkdir -p build/bin
gox -ldflags '-X main.version=${{ github.ref }}' \
gox -ldflags '-X main.version=${{ steps.release_version.outputs.tag }}' \
-output='build/bin/{{.Dir}}-{{.OS}}-{{.Arch}}' \
-os='windows linux darwin freebsd' \
-arch='amd64 386 arm arm64' \
Expand Down

0 comments on commit 3c63384

Please sign in to comment.