fix: update ota builder for arm64

This commit is contained in:
Horror Proton
2023-03-08 12:05:34 +08:00
parent 0fe438d34d
commit ac4ef76a81
3 changed files with 9 additions and 8 deletions

View File

@@ -109,7 +109,7 @@ jobs:
needs: [set-tag, build-win-nightly]
strategy:
matrix:
target: [x64, ARM64]
target: [x64, arm64]
runs-on: ubuntu-latest
steps:
- run: echo ${{ needs.set-tag.outputs.tag }}
@@ -155,7 +155,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build-ota
$GITHUB_WORKSPACE/MaaAssistantArknights/tools/OTAPacker/build.sh 'MaaAssistantArknights/MaaAssistantArknights' ./config "${{ github.repository_owner }}/MaaRelease"
$GITHUB_WORKSPACE/MaaAssistantArknights/tools/OTAPacker/build.sh 'MaaAssistantArknights/MaaAssistantArknights' ./config ${{ matrix.target }} "${{ github.repository_owner }}/MaaRelease"
mv -v ${{ needs.build-win-nightly.outputs.tag }}/*.zip ./MAA-${{ env.release_tag }}-win-${{ matrix.target }}.zip
- name: "Commit and setup tag"
run: |

View File

@@ -19,7 +19,7 @@ jobs:
make-ota:
runs-on: "ubuntu-latest"
matrix:
target: [x64, ARM64]
target: [x64, arm64]
steps:
- name: "Fetch MaaRelease"
uses: actions/checkout@v3
@@ -65,7 +65,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd build-ota
$GITHUB_WORKSPACE/MaaAssistantArknights/tools/OTAPacker/build.sh 'MaaAssistantArknights/MaaAssistantArknights' ./config 'MaaAssistantArknights/MaaRelease'
$GITHUB_WORKSPACE/MaaAssistantArknights/tools/OTAPacker/build.sh 'MaaAssistantArknights/MaaAssistantArknights' ./config ${{ matrix.target }} 'MaaAssistantArknights/MaaRelease'
- name: "Commit and setup tag"
run: |
cd MaaRelease

View File

@@ -2,7 +2,8 @@
source_repo=$1
releases_txt="$2"
source_repo_fallback=$3
arch=$3
source_repo_fallback=$4
working_dir="$(pwd)"
echo "working_dir: $working_dir"
@@ -16,8 +17,8 @@ while read tag; do
mkdir -pv "$tag"
cd "$tag"
echo "Downloading $tag"
gh release download "$tag" --repo $source_repo --pattern "MAA-$tag-win-x64.zip" --pattern "MaaBundle-$tag.zip" --clobber \
|| gh release download "$tag" --repo $source_repo_fallback --pattern "MAA-$tag-win-x64.zip" --pattern "MaaBundle-$tag.zip" --clobber
gh release download "$tag" --repo $source_repo --pattern "MAA-$tag-win-$arch.zip" --clobber \
|| gh release download "$tag" --repo $source_repo_fallback --pattern "MAA-$tag-win-$arch.zip" --clobber
mkdir -pv 'content'
unzip -q -O GB2312 -o "*.zip" -d 'content'
rm -fv *.zip
@@ -36,7 +37,7 @@ while read tag; do
"$script_dir"/makeota.sh "$tag"/content "$latest_tag"/content "$tag"/pkg
echo "Creating zip archive"
cd "$tag"/pkg
zip -q -9 -r "$working_dir"/"MAAComponent-OTA-${tag}_${latest_tag}-win-x64.zip" .
zip -q -9 -r "$working_dir"/"MAAComponent-OTA-${tag}_${latest_tag}-win-$arch.zip" .
cd $working_dir
fi
done < "$releases_txt"