Skip to content

Commit

Permalink
ensure the version is set in CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekz committed Aug 27, 2023
1 parent efb5974 commit e43f7b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
cache: true
- run: go mod tidy
- run: go test -v ./...
- uses: rickstaa/action-get-semver@v1
id: get_semver
- name: Set env
run: export RELEASE_VERSION=${{ steps.get_semver.outputs.current_version }}
- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ before:
builds:
- env:
- CGO_ENABLED=0
- ldflags:
- "-X github.com/tomekz/coincap-tui/cmd.version={{.Env.RELEASE_VERSION}}"
goos:
- linux
- windows
Expand Down

0 comments on commit e43f7b6

Please sign in to comment.