Skip to content

Commit

Permalink
ci: 更新install.yml中使用的Action (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
overflow65537 authored Oct 1, 2024
1 parent 10f0682 commit 3786a8d
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}*"
Expand All @@ -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"
Expand All @@ -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 }}*"
Expand All @@ -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"
Expand All @@ -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 }}*"
Expand All @@ -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

Expand All @@ -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 }}

0 comments on commit 3786a8d

Please sign in to comment.