Legacy-iOS-Kit/.github/workflows/build.yml

103 lines
4.6 KiB
YAML
Raw Normal View History

2022-07-04 12:12:27 +02:00
name: Create zip files
on: [push]
jobs:
create-zip-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2022-08-18 07:43:39 +02:00
- name: Create name version env
run: |
2022-10-12 00:00:59 +02:00
sudo timedatectl set-timezone Asia/Singapore
2022-08-18 07:43:39 +02:00
echo "DATE=$(date +%Y-%m-%d)" >> $GITHUB_ENV
echo "SHA_SHORT=$(echo ${{ github.sha }} | cut -c -7)" >> $GITHUB_ENV
- name: Create git hash
run: echo "${{ env.DATE }}-${{ env.SHA_SHORT }}" | tee ./resources/git_hash
2022-07-24 14:33:27 +02:00
2022-07-04 12:12:27 +02:00
- name: Move linux binaries
run: |
2022-07-14 10:49:13 +02:00
mkdir -p ./exclude/firmware ./exclude/lib ./exclude/tools
mv ./resources/lib/* ./exclude/lib
mv ./resources/tools/*linux* ./exclude/tools
2022-07-04 12:12:27 +02:00
2022-07-04 13:58:45 +02:00
- name: Download and extract libimobiledevice_macos
run: |
curl -LO https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_macos.zip
mkdir ./resources/libimobiledevice_macos
unzip libimobiledevice_macos.zip -d ./resources/libimobiledevice_macos
chmod +x ./resources/libimobiledevice_macos/*
2022-07-04 12:12:27 +02:00
2022-07-04 13:58:45 +02:00
- name: Zip macos files
2022-08-18 07:43:39 +02:00
run: zip -r ${{ github.event.repository.name }}_macos_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip resources/ restore.sh README.md
2022-07-04 12:12:27 +02:00
- name: Move macos binaries
run: |
2022-07-14 10:49:13 +02:00
mv ./exclude/lib/* ./resources/lib
mv ./exclude/tools/* ./resources/tools
mv ./resources/tools/*macos* ./exclude/tools
2022-12-24 04:49:22 +01:00
mv ./resources/libimobiledevice_macos ./exclude
2022-07-04 12:12:27 +02:00
2022-07-04 13:58:45 +02:00
- name: Download and extract libimobiledevice_linux
run: |
curl -LO https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_linux.zip
mkdir ./resources/libimobiledevice_linux
unzip libimobiledevice_linux.zip -d ./resources/libimobiledevice_linux
chmod +x ./resources/libimobiledevice_linux/*
2022-07-04 12:12:27 +02:00
2022-07-04 13:58:45 +02:00
- name: Zip linux files
2022-08-18 07:43:39 +02:00
run: zip -r ${{ github.event.repository.name }}_linux_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip resources/ restore.sh README.md
2022-07-04 12:12:27 +02:00
2022-12-24 04:49:22 +01:00
- name: Download and extract tools_linux_arm
run: |
curl -LO https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_linux_arm.zip
2022-12-24 05:22:27 +01:00
unzip -o tools_linux_arm.zip -d ./resources
2022-12-24 04:49:22 +01:00
- name: Zip linux arm files
run: zip -r ${{ github.event.repository.name }}_linux_arm_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip resources/ restore.sh README.md
- name: Move linux arm binaries and other files
2022-07-14 10:49:13 +02:00
run: |
mv ./resources/lib/* ./exclude/lib
mv ./resources/tools/*linux* ./exclude/tools
2022-12-24 05:22:27 +01:00
mv ./resources/libimobiledevice_linux ./exclude
2022-07-14 10:49:13 +02:00
mv ./resources/firmware/FirmwareBundles ./resources/firmware/JailbreakBundles ./exclude/firmware
2022-09-20 14:28:20 +02:00
mkdir ./resources/firmware/FirmwareBundles
mv ./exclude/firmware/FirmwareBundles/Down_iPhone3* ./resources/firmware/FirmwareBundles
2022-07-04 12:12:27 +02:00
2022-07-04 13:58:45 +02:00
- name: Download and extract libimobiledevice_win
run: |
curl -LO https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/libimobiledevice_win.zip
mkdir ./resources/libimobiledevice_win
unzip libimobiledevice_win.zip -d ./resources/libimobiledevice_win
- name: Download and extract tools_win
run: |
curl -LO https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/tools/tools_win.zip
2022-12-24 04:49:22 +01:00
unzip -o tools_win.zip -d ./resources
2022-07-04 13:58:45 +02:00
- name: Zip win files
2022-08-18 07:43:39 +02:00
run: zip -r ${{ github.event.repository.name }}_win_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip resources/ restore.cmd restore.sh README.md
2022-07-04 13:58:45 +02:00
2022-07-14 10:49:13 +02:00
- name: Copy exclude files back
run: cp -r ./exclude/* ./resources
- name: Download other files
run: ./resources/complete.sh
- name: Zip complete files
2022-08-18 07:43:39 +02:00
run: zip -r ${{ github.event.repository.name }}_complete_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip resources/ restore.cmd restore.sh README.md
2022-07-14 10:49:13 +02:00
2022-07-04 13:58:45 +02:00
- name: Update latest release
uses: pyTooling/Actions/releaser@main
2022-07-04 12:12:27 +02:00
with:
2022-07-04 13:58:45 +02:00
tag: latest
rm: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
2022-08-18 07:43:39 +02:00
${{ github.event.repository.name }}_complete_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
${{ github.event.repository.name }}_macos_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
${{ github.event.repository.name }}_linux_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
2022-12-24 04:49:22 +01:00
${{ github.event.repository.name }}_linux_arm_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
2022-08-18 07:43:39 +02:00
${{ github.event.repository.name }}_win_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip