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