From dcf8e5943b984c015e36679a74aa5a477acd19d9 Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Tue, 3 Nov 2020 15:35:13 +0300 Subject: [PATCH] fix version in build worflow --- .github/workflows/build-release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 9c55e5d..520bd18 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -10,6 +10,10 @@ jobs: runs-on: ubuntu-latest steps: + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) + - name: checkout uses: actions/checkout@v2 @@ -19,7 +23,7 @@ jobs: go-version: '1.13.0' - name: Build - run: make -j $(nproc) compile VERSION=${{ github.ref }} + run: make -j $(nproc) compile VERSION=${{ steps.get_version.outputs.VERSION }} - name: create release id: create_release @@ -27,8 +31,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ steps.get_version.outputs.VERSION }} + release_name: Release ${{ steps.get_version.outputs.VERSION }} draft: false prerelease: false