From 6294f7c9f7dd871bce3d9cfb6efdc2c52ae2c758 Mon Sep 17 00:00:00 2001 From: Leon Wright Date: Tue, 27 Apr 2021 18:47:08 +0800 Subject: [PATCH] chore: separate tagging from release for better release notes --- .github/workflows/release.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2ebc0d..af52e23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,13 +8,32 @@ on: - filament_scale_enhanced/fse_version.py jobs: - release: + tag: runs-on: ubuntu-latest + outputs: + version: ${{ steps.output_version.outputs.version }} steps: - uses: actions/checkout@v2 - name: collect_tag_version run: | echo VERSION=$(cat filament_scale_enhanced/fse_version.py | awk '{ print $3 }' | sed 's/"//g') >> $GITHUB_ENV + - name: Push tag + uses: mathieudutour/github-tag-action@v5.5 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + custom_tag: ${{ env.VERSION }} + tag_prefix: v + - name: Output Version + id: output_version + run: echo "::set-output name=version::${{ env.VERSION }}" + + release: + runs-on: ubuntu-latest + needs: tag + steps: + - uses: actions/checkout@v2 + with: + ref: "v${{ needs.tag.outputs.version }}" - name: Setup Python uses: actions/setup-python@v2 with: @@ -34,7 +53,7 @@ jobs: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false draft: false - automatic_release_tag: "v${{ env.VERSION }}" + automatic_release_tag: "v${{ needs.tag.outputs.version }}" files: | LICENSE.txt dist/Filament_Scale_Enhanced.zip \ No newline at end of file