From 5290616857d423fde1043ceed3e52ded7cdcc370 Mon Sep 17 00:00:00 2001 From: Joe Higton Date: Tue, 2 Aug 2022 08:24:31 +0100 Subject: [PATCH] [build] get the release tag from git --- .github/workflows/releasebuild.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/releasebuild.yml b/.github/workflows/releasebuild.yml index 6557f68..8e52555 100644 --- a/.github/workflows/releasebuild.yml +++ b/.github/workflows/releasebuild.yml @@ -17,13 +17,15 @@ jobs: - goarch: arm64 goos: windows steps: - - uses: actions/checkout@v3 - - uses: wangyoucao577/go-release-action@v1.30 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - goos: ${{ matrix.goos }} - goarch: ${{ matrix.goarch }} - project_path: "." - binary_name: "json2nd" - extra_files: LICENSE Readme.org doc/ - ldflags: -X main.version=${{ env.RELEASE_TAG }} + - uses: actions/checkout@v3 + # got to be a better way? + - run: echo "RELEASE_TAG="`git describe --tags` >> $GITHUB_ENV + - uses: wangyoucao577/go-release-action@v1.30 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + project_path: "." + binary_name: "json2nd" + extra_files: LICENSE Readme.org doc/ + ldflags: -X main.version=${{ env.RELEASE_TAG }}