From 0ae41573840900f5813d3a80e4470e381ebdec7e Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sun, 19 Oct 2025 12:10:56 +0800 Subject: [PATCH] create release Signed-off-by: bggRGjQaUbCoE --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++++++--- .github/workflows/ios.yml | 17 +++++++++++++- .github/workflows/linux_arm64.yml | 17 ++++++++++++++ .github/workflows/linux_x64.yml | 17 ++++++++++++++ .github/workflows/mac.yml | 17 +++++++++++++- .github/workflows/win_x64.yml | 26 ++++++++++++++++++++-- 6 files changed, 124 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25dab85e..0ce98e64 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,11 +47,18 @@ on: default: true type: boolean + tag: + description: "tag" + required: false + default: "" + type: string + jobs: android: if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_android == 'true' }} name: Release Android runs-on: ubuntu-latest + permissions: write-all steps: - name: 代码迁出 @@ -108,43 +115,67 @@ jobs: done shell: bash + - name: Release + if: ${{ github.event.inputs.tag != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.event.inputs.tag }} + name: ${{ github.event.inputs.tag }} + files: | + PiliPlus_android_*.apk + - name: 上传 uses: actions/upload-artifact@v4 with: - name: app-arm64-v8a + name: Android_arm64-v8a path: | PiliPlus_android_*_arm64-v8a.apk - name: 上传 uses: actions/upload-artifact@v4 with: - name: app-armeabi-v7a + name: Android_armeabi-v7a path: | PiliPlus_android_*_armeabi-v7a.apk - name: 上传 uses: actions/upload-artifact@v4 with: - name: app-x86_64 + name: Android_x86_64 path: | PiliPlus_android_*_x86_64.apk ios: if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_ios == 'true' }} uses: ./.github/workflows/ios.yml + permissions: write-all + with: + tag: github.event.inputs.tag mac: if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_mac == 'true' }} uses: ./.github/workflows/mac.yml + permissions: write-all + with: + tag: github.event.inputs.tag win_x64: if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_win_x64 == 'true' }} uses: ./.github/workflows/win_x64.yml + permissions: write-all + with: + tag: github.event.inputs.tag linux_x64: if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_linux_x64 == 'true' }} uses: ./.github/workflows/linux_x64.yml + permissions: write-all + with: + tag: github.event.inputs.tag linux_arm64: if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_linux_arm64 == 'true' }} uses: ./.github/workflows/linux_arm64.yml + permissions: write-all + with: + tag: github.event.inputs.tag diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 5672be01..60308b4c 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -2,6 +2,12 @@ name: Build for iOS on: workflow_call: + inputs: + tag: + description: "tag" + required: false + default: "" + type: string workflow_dispatch: jobs: @@ -30,8 +36,17 @@ jobs: ln -sf ./build/ios/iphoneos Payload zip -r9 PiliPlus_ios_${{env.version}}.ipa Payload/runner.app + - name: Release + if: ${{ github.event.inputs.tag != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.event.inputs.tag }} + name: ${{ github.event.inputs.tag }} + files: | + PiliPlus_ios_*.ipa + - name: Upload ios release uses: actions/upload-artifact@v4 with: - name: ios-release + name: iOS-release path: PiliPlus_ios_*.ipa diff --git a/.github/workflows/linux_arm64.yml b/.github/workflows/linux_arm64.yml index c8cebd76..020ea10e 100644 --- a/.github/workflows/linux_arm64.yml +++ b/.github/workflows/linux_arm64.yml @@ -2,6 +2,12 @@ name: Build for Linux Arm64 on: workflow_call: + inputs: + tag: + description: "tag" + required: false + default: "" + type: string workflow_dispatch: jobs: @@ -174,6 +180,17 @@ jobs: printf "完成: PiliPlus_linux_%s_arm64.rpm\n" "${{ env.version }}" shell: bash + - name: Release + if: ${{ github.event.inputs.tag != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.event.inputs.tag }} + name: ${{ github.event.inputs.tag }} + files: | + PiliPlus_linux_*.tar.gz + PiliPlus_linux_*.deb + PiliPlus_linux_*.rpm + - name: Upload linux targz package uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/linux_x64.yml b/.github/workflows/linux_x64.yml index a73634fc..ed4663c8 100644 --- a/.github/workflows/linux_x64.yml +++ b/.github/workflows/linux_x64.yml @@ -2,6 +2,12 @@ name: Build for Linux x64 on: workflow_call: + inputs: + tag: + description: "tag" + required: false + default: "" + type: string workflow_dispatch: jobs: @@ -174,6 +180,17 @@ jobs: printf "完成: PiliPlus_linux_%s_amd64.rpm\n" "${{ env.version }}" shell: bash + - name: Release + if: ${{ github.event.inputs.tag != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.event.inputs.tag }} + name: ${{ github.event.inputs.tag }} + files: | + PiliPlus_linux_*.tar.gz + PiliPlus_linux_*.deb + PiliPlus_linux_*.rpm + - name: Upload linux targz package uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 6e334177..0015097a 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -2,6 +2,12 @@ name: Build for Mac on: workflow_call: + inputs: + tag: + description: "tag" + required: false + default: "" + type: string workflow_dispatch: jobs: @@ -36,8 +42,17 @@ jobs: - name: Rename DMG run: mv PiliPlus*.dmg PiliPlus_macos_${{ env.version }}.dmg + - name: Release + if: ${{ github.event.inputs.tag != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.event.inputs.tag }} + name: ${{ github.event.inputs.tag }} + files: | + PiliPlus_macos_*.dmg + - name: Upload macos release uses: actions/upload-artifact@v4 with: - name: macos-release + name: macOS-release path: PiliPlus_macos_*.dmg diff --git a/.github/workflows/win_x64.yml b/.github/workflows/win_x64.yml index 5207f167..71b71782 100644 --- a/.github/workflows/win_x64.yml +++ b/.github/workflows/win_x64.yml @@ -2,6 +2,12 @@ name: Build for Windows x64 on: workflow_call: + inputs: + tag: + description: "tag" + required: false + default: "" + type: string workflow_dispatch: jobs: @@ -45,14 +51,30 @@ jobs: mv build/windows/x64/runner/Release/* Release/PiliPlus-Win/ mv dist/**/*.exe PiliPlus-Win-Setup/PiliPlus_windows_${{env.version}}_x64_setup.exe + - name: Compress + if: ${{ github.event.inputs.tag != '' }} + run: | + Compress-Archive -Path "Release/PiliPlus-Win" -DestinationPath "PiliPlus_windows_${{env.version}}_x64.zip" + shell: pwsh + + - name: Release + if: ${{ github.event.inputs.tag != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ github.event.inputs.tag }} + name: ${{ github.event.inputs.tag }} + files: | + PiliPlus_windows_*.zip + PiliPlus-Win-Setup/PiliPlus_windows_*.exe + - name: Upload windows file release uses: actions/upload-artifact@v4 with: - name: PiliPlus_windows_${{env.version}}_x64 + name: Windows-file-x64-release path: Release - name: Upload windows setup release uses: actions/upload-artifact@v4 with: - name: windows-setup-x64-release + name: Windows-setup-x64-release path: PiliPlus-Win-Setup