From 3e41fa5915e005e648e188070725827ec5992fc3 Mon Sep 17 00:00:00 2001 From: Ali Najafizadeh Date: Thu, 11 Jan 2024 14:22:48 -0500 Subject: [PATCH] Update the way to grabbing tag's name --- .github/workflows/build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6661523..7234682 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,6 @@ jobs: SELF_UPDATE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} SELF_UPDATE_PRIVATE_KEY: ${{ secrets.SELF_UPDATE_PRIVATE_KEY }} SELF_UPDATE_PUBLIC_KEY: ${{ secrets.SELF_UPDATE_PUBLIC_KEY }} - SELF_UPDATE_VERSION: ${{ github.ref_name }} steps: - name: Setup Go 1.21 @@ -45,15 +44,15 @@ jobs: ./selfupdate github release \ --owner blockthrough \ --repo selfupdate.go \ - --version ${{ SELF_UPDATE_VERSION }} \ - --title ${{ SELF_UPDATE_VERSION }} \ + --version ${{ github.ref_name }} \ + --title ${{ github.ref_name }} \ --token ${{ SELF_UPDATE_GH_TOKEN }} - name: Build and Sign run: | GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} \ go build \ - -ldflags "-X main.Version=${{ SELF_UPDATE_VERSION }} -X main.PublicKey=${{ SELF_UPDATE_PUBLIC_KEY }}" \ + -ldflags "-X main.Version=${{ github.ref_name }} -X main.PublicKey=${{ SELF_UPDATE_PUBLIC_KEY }}" \ -o ./selfupdate-${{ matrix.os }}-${{ matrix.arch }} \ ./cmd/selfupdate/main.go @@ -63,6 +62,6 @@ jobs: --owner blockthrough \ --repo selfupdate.go \ --filename selfupdate-${{ matrix.os }}-${{ matrix.arch }}.sign \ - --version ${{ SELF_UPDATE_VERSION }} \ + --version ${{ github.ref_name }} \ --token ${{ SELF_UPDATE_GH_TOKEN }} \ --key ${{ SELF_UPDATE_PRIVATE_KEY }} < ./selfupdate-${{ matrix.os }}-${{ matrix.arch }}