fix version in build worflow

This commit is contained in:
GenZmeY 2020-11-03 15:35:13 +03:00
parent 511164546d
commit dcf8e5943b

View File

@ -10,6 +10,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -19,7 +23,7 @@ jobs:
go-version: '1.13.0' go-version: '1.13.0'
- name: Build - name: Build
run: make -j $(nproc) compile VERSION=${{ github.ref }} run: make -j $(nproc) compile VERSION=${{ steps.get_version.outputs.VERSION }}
- name: create release - name: create release
id: create_release id: create_release
@ -27,8 +31,8 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: Release ${{ github.ref }} release_name: Release ${{ steps.get_version.outputs.VERSION }}
draft: false draft: false
prerelease: false prerelease: false