From 1ce5c841af14f8b31b13c2fbf6a1c5a4b8f09600 Mon Sep 17 00:00:00 2001 From: Cheng XU Date: Sun, 5 Sep 2021 01:04:05 -0700 Subject: [PATCH] ci: fix tag version in release workflow --- .github/workflows/build.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 440ddf5..0eceb8a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,10 @@ jobs: steps: - name: Set up Git repository uses: actions/checkout@v2 + - name: Get release version + run: | + echo "TAG_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "version is: ${{ env.TAG_VERSION }}" - name: Set up rust toolchain uses: actions-rs/toolchain@v1 with: @@ -58,8 +62,8 @@ jobs: - name: Create Release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ github.ref }} - name: Release ${{ github.ref }} + tag_name: ${{ env.TAG_VERSION }} + name: Release ${{ env.TAG_VERSION }} draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}