Skip to content

Commit

Permalink
chore: update the script of workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
x-tools-author committed Nov 25, 2023
1 parent 1b35ad0 commit b9be81d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
- 'v*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${GITHUB_REF#refs/tags/}

jobs:
update-release:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'
ls && gh release upload ${{ github.ref_name }} 'build/sak/QtSwissArmyKnife/qtswissarmyknife-macos-11.dmg'

0 comments on commit b9be81d

Please sign in to comment.