diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 10c94f4..68b0986 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,10 +45,7 @@ jobs: contents: write runs-on: ubuntu-latest needs: test - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: - - name: Get tag and hash - run: echo "::set-output name=tag_hash::$(printf $(git describe --tags | cut -d '-' -f 1)-$(git rev-parse --short HEAD))" - name: Checkout uses: actions/checkout@v2 with: @@ -88,5 +85,5 @@ jobs: platforms: linux/amd64,linux/arm64 tags: | hooksie1/cmsnr:latest - hooksie1/cmsnr:{{ steps.vars.outputs.tag_hash}} + hooksie1/cmsnr:${{ github.ref_name }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b171958..7e5fc86 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -3,12 +3,12 @@ before: - go mod tidy env: - - IMAGE_TAG={{.Tag}}-${{.ShortCommit}} + - IMAGE_TAG={{.Tag}} project_name: cmsnrctl builds: - - ldflags: "-extldflags= -w -X 'github.com/hooksie1/cmsnr/cmd.Version={{.Tag}}-{{.ShortCommit}}'" + - ldflags: "-extldflags= -w -X 'github.com/hooksie1/cmsnr/cmd.Version={{.Tag}}'" env: - "CGO_ENABLED=0" - "GO111MODULE=on"