From b9be81d4616b0d15757e74f381ff49a00d5a89cb Mon Sep 17 00:00:00 2001 From: Qsaker Date: Sat, 25 Nov 2023 14:39:03 +0800 Subject: [PATCH] chore: update the script of workflow --- .github/workflows/build-release.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 40b2b3a72..8c4759c98 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -5,7 +5,6 @@ on: - 'v*' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAG_NAME: ${GITHUB_REF#refs/tags/} jobs: update-release: @@ -15,10 +14,10 @@ jobs: uses: actions/checkout@v3 - name: Delete Release run: | - gh release delete $TAG_NAME -y || true + gh release delete ${{ github.ref_name }} -y || true - name: Create Release run: | - gh release create $TAG_NAME --title "Release $TAG_NAME" --notes "The version is ready. You can see the changed log: https://github.com/qsaker/QtSwissArmyKnife/blob/master/resources/files/History.txt" + gh release create ${{ github.ref_name }} --title "Release ${{ github.ref_name }}" --notes "The version is ready. You can see the changed log: https://github.com/qsaker/QtSwissArmyKnife/blob/master/resources/files/History.txt" release-for-windows: runs-on: windows-2019 needs: update-release @@ -44,7 +43,7 @@ jobs: dir && dir .\sak && dir .\sak\QtSwissArmyKnife - name: Upload Release Asset for Windnows run: | - dir && gh release upload $TAG_NAME 'build\sak\qtswissarmyknife-windows-amd64.zip' + dir && gh release upload ${{ github.ref_name }} 'build\sak\qtswissarmyknife-windows-amd64.zip' release-for-linux: runs-on: ubuntu-20.04 needs: update-release @@ -71,7 +70,7 @@ jobs: dir && dir ./sak && dir ./sak/QtSwissArmyKnife - name: Upload Release Asset for Linux run: | - dir && gh release upload $TAG_NAME 'build/qtswissarmyknife-linux-x86_64.AppImage' + dir && gh release upload ${{ github.ref_name }} 'build/qtswissarmyknife-linux-x86_64.AppImage' release-for-macos: runs-on: macos-11 needs: update-release @@ -104,4 +103,4 @@ jobs: ls && ls ./sak && ls ./sak/QtSwissArmyKnife - name: Upload Release Asset for macOS run: | - ls && gh release upload $TAG_NAME 'build/sak/QtSwissArmyKnife/qtswissarmyknife-macos-11.dmg' \ No newline at end of file + ls && gh release upload ${{ github.ref_name }} 'build/sak/QtSwissArmyKnife/qtswissarmyknife-macos-11.dmg' \ No newline at end of file