From ae101c68ff284f5866ce364c4f786d4cd777aef1 Mon Sep 17 00:00:00 2001 From: Nathaniel Saxe Date: Fri, 1 Mar 2024 11:56:40 -0500 Subject: [PATCH] attach version tag to goreleaser --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb8c437..92a4986 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,9 +80,9 @@ jobs: distribution: goreleaser version: latest args: release --clean - ldflags: "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" env: GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} + VERSION: ${{ steps.release.outputs.tag_name }} # - name: upload linux arm64 release binary # uses: actions/upload-release-asset@v1.0.2 # env: diff --git a/.goreleaser.yml b/.goreleaser.yml index 6aecbe1..2bf4555 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -8,8 +8,11 @@ builds: - arm64 env: - CGO_ENABLED=0 + - VERSION={{ .Env.VERSION }} flags: - -mod=mod + ldflags: + - -X 'main.Version=$VERSION' release: prerelease: auto @@ -18,8 +21,7 @@ universal_binaries: - replace: true brews: - - - name: runpod + - name: runpod homepage: "https://github.com/runpod/runpodctl" repository: owner: runpod @@ -29,4 +31,4 @@ brews: email: prachford@icloud.com checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt"