From e9b6e9f664ad83efc68e96210263b1b29b860457 Mon Sep 17 00:00:00 2001 From: Horis <8674809+821938089@users.noreply.github.com> Date: Wed, 24 Jul 2024 21:47:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22edd5202..a031002bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -141,6 +141,14 @@ jobs: if-no-files-found: ignore path: ${{ github.workspace }}/apk/*.apk + - name: Upload App To Artifact For Pre-Release + if: env.type == 'release' + uses: actions/upload-artifact@v4 + with: + name: legado.prerelease + if-no-files-found: ignore + path: ${{ github.workspace }}/app/build/outputs/apk/*/*/*.apk + - name: Upload Mapping File To Artifact uses: actions/upload-artifact@v4 with: @@ -148,21 +156,36 @@ jobs: if-no-files-found: ignore path: ${{ github.workspace }}/mapping/mapping.txt + prerelease: + needs: [ prepare, build ] + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + env: + VERSION: ${{ needs.prepare.outputs.version }} + steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 + with: + name: legado.prerelease + path: ${{ github.workspace }}/prerelease/ + - name: Delete Pre-Release - if: env.type == 'release' run: gh release delete beta -y --cleanup-tag env: GH_TOKEN: ${{ github.token }} - name: Publish Pre-Release - if: env.type == 'release' uses: ncipollo/release-action@v1 with: - name: legado_${{ env.product }}_${{ env.VERSION }} + name: legado_app_${{ env.VERSION }} tag: "beta" - body: "此版本为测试版,可能存在不稳定情况,升级前请务必备份好数据。" + body: "此版本为测试版,签名与正式版不同,可能存在不稳定情况,升级前请务必备份好数据。" prerelease: true - artifacts: ${{ github.workspace }}/app/build/outputs/apk/*/*/*.apk + artifacts: ${{ github.workspace }}/prerelease/*.apk + + - uses: geekyeggo/delete-artifact@v5 + with: + name: legado.prerelease lanzou: needs: [ prepare, build ]