From ce7edc1612338c9b57f8766046b4175b969662ae Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 7 Jul 2020 18:41:26 +0800 Subject: [PATCH] =?UTF-8?q?ci(release):=20=E4=BF=AE=E6=94=B9=20release=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84tag=EF=BC=8C=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-drafter.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index a920dd7d3..e50aae839 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -15,6 +15,13 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v2 + - name: Get version + id: get_version + run: | + TAG=$(basename ${GITHUB_REF}) + VERSION=${TAG/v/} + echo "::set-output name=TAG::$TAG" + echo "::set-output name=VERSION::$VERSION" - name: Create Release id: create_release uses: release-drafter/release-drafter@v5 @@ -22,6 +29,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: config-name: release-config.yml + version: ${{ steps.get_version.outputs.TAG }} + tag: ${{ steps.get_version.outputs.TAG }} build-and-release: needs: create-realese