From 3786a8d16c5fdf51cc9a536b18cf3e755ffcf71a Mon Sep 17 00:00:00 2001 From: overflow65537 Date: Tue, 1 Oct 2024 20:31:59 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0install.yml=E4=B8=AD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84Action=20(#11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/install.yml | 60 ++++++++++++++++++++++++++--------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 283bfd7..1cc519e 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -23,7 +23,7 @@ jobs: meta: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: set_tag @@ -58,12 +58,12 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Download MaaFramework - uses: robinraju/release-downloader@v1.8 + uses: robinraju/release-downloader@v1 with: repository: MaaXYZ/MaaFramework fileName: "MAA-win-${{ matrix.arch }}*" @@ -76,7 +76,7 @@ jobs: run: | python ./install.py ${{ needs.meta.outputs.tag }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: MaaXXX-win-${{ matrix.arch }} path: "install" @@ -90,12 +90,12 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Download MaaFramework - uses: robinraju/release-downloader@v1.8 + uses: robinraju/release-downloader@v1 with: repository: MaaXYZ/MaaFramework fileName: "MAA-linux-${{ matrix.arch }}*" @@ -108,7 +108,7 @@ jobs: run: | python ./install.py ${{ needs.meta.outputs.tag }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: MaaXXX-linux-${{ matrix.arch }} path: "install" @@ -122,12 +122,12 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Download MaaFramework - uses: robinraju/release-downloader@v1.8 + uses: robinraju/release-downloader@v1 with: repository: MaaXYZ/MaaFramework fileName: "MAA-macos-${{ matrix.arch }}*" @@ -140,19 +140,49 @@ jobs: run: | python ./install.py ${{ needs.meta.outputs.tag }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: MaaXXX-macos-${{ matrix.arch }} path: "install" + android: + needs: meta + runs-on: macos-latest + strategy: + matrix: + arch: [aarch64, x86_64] + fail-fast: false + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Download MaaFramework + uses: robinraju/release-downloader@v1 + with: + repository: MaaXYZ/MaaFramework + fileName: "MAA-android-${{ matrix.arch }}*" + latest: true + out-file-path: "deps" + extract: true + + - name: Install + shell: bash + run: | + python ./install.py ${{ needs.meta.outputs.tag }} + + - uses: actions/upload-artifact@v4 + with: + name: MaaXXX-android-${{ matrix.arch }} + path: "install" + release: if: ${{ needs.meta.outputs.is_release == 'true' }} - needs: [meta, windows, ubuntu, macos] + needs: [meta, windows, ubuntu, macos, android] runs-on: ubuntu-latest - permissions: - contents: write steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: assets @@ -161,7 +191,7 @@ jobs: for f in *; do (cd $f && zip -r ../$f-${{ needs.meta.outputs.tag }}.zip .) done - - uses: softprops/action-gh-release@v1 + - uses: softprops/action-gh-release@v2 with: files: assets/* tag_name: ${{ needs.meta.outputs.tag }}