2022-07-04 12:12:27 +02:00
|
|
|
name: Create zip files
|
2023-01-13 05:25:27 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2022-07-04 12:12:27 +02:00
|
|
|
jobs:
|
|
|
|
create-zip-files:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-04-02 12:18:44 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-07-04 12:12:27 +02:00
|
|
|
|
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
|
2023-04-02 12:18:44 +02:00
|
|
|
echo "DATE=$(date +%y.%m)" >> $GITHUB_ENV
|
2023-04-02 16:16:32 +02:00
|
|
|
echo "COUNT=$(git rev-list --count HEAD --since=$(date --date="$(date +%Y-%m-01) - 1 second" +%s) | xargs printf "%02d")" >> $GITHUB_ENV
|
2022-08-18 07:43:39 +02:00
|
|
|
echo "SHA_SHORT=$(echo ${{ github.sha }} | cut -c -7)" >> $GITHUB_ENV
|
2023-04-02 12:18:44 +02:00
|
|
|
echo "DATE_OLD=$(date +%Y-%m-%d)" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Create git hash and version
|
|
|
|
run: |
|
|
|
|
echo "${{ env.SHA_SHORT }}" | tee ./resources/git_hash
|
|
|
|
echo "v${{ env.DATE }}.${{ env.COUNT }}" | tee ./resources/version
|
2022-08-18 07:43:39 +02:00
|
|
|
|
2023-04-02 12:18:44 +02:00
|
|
|
- name: Download some files
|
|
|
|
run: |
|
2024-06-11 08:22:50 +02:00
|
|
|
mkdir saved
|
2023-04-02 12:18:44 +02:00
|
|
|
pushd resources
|
2024-08-24 10:53:07 +02:00
|
|
|
curl -L https://github.com/LukeZGD/ipwndfu/archive/1d22fd01b0daf52bbcf1ce730022d4212d87f967.zip -o ipwndfu.zip
|
2023-04-02 12:18:44 +02:00
|
|
|
curl -L https://github.com/LukeZGD/Legacy-iOS-Kit-Keys/archive/refs/heads/master.zip -o keys.zip
|
|
|
|
unzip keys.zip -d .
|
|
|
|
unzip ipwndfu.zip -d .
|
|
|
|
cp -r Legacy-iOS-Kit-Keys-master/* firmware
|
2024-06-11 08:22:50 +02:00
|
|
|
mv ipwndfu*/ ../saved/ipwndfu
|
2023-04-02 12:18:44 +02:00
|
|
|
rm -rf Legacy-iOS-Kit-Keys-master/ ipwndfu.zip keys.zip
|
2024-08-24 11:23:41 +02:00
|
|
|
echo "30f0802078ab6ff83d6b918e13f09a652a96d6dc" > ../saved/ipwndfu/sha1check
|
2023-04-02 12:18:44 +02:00
|
|
|
popd
|
2022-07-24 14:33:27 +02:00
|
|
|
|
2022-07-04 12:12:27 +02:00
|
|
|
- name: Move linux binaries
|
|
|
|
run: |
|
2023-02-04 07:43:34 +01:00
|
|
|
mkdir -p ./exclude/bin
|
2023-01-13 05:25:27 +01:00
|
|
|
cp -R ./bin/* ./exclude/bin
|
2023-08-05 17:00:27 +02:00
|
|
|
rm -r ./bin/linux
|
2022-07-04 12:12:27 +02:00
|
|
|
|
2022-07-04 13:58:45 +02:00
|
|
|
- name: Zip macos files
|
2024-08-31 03:42:07 +02:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_macos_v${{ env.DATE }}.${{ env.COUNT }}.zip bin/ LICENSE resources/ restore.sh README.md saved/
|
2022-07-04 12:12:27 +02:00
|
|
|
|
|
|
|
- name: Move macos binaries
|
|
|
|
run: |
|
2023-01-13 05:25:27 +01:00
|
|
|
rm -r ./bin/macos
|
|
|
|
mkdir ./bin/linux
|
|
|
|
cp -R ./exclude/bin/linux/x86_64 ./bin/linux
|
2022-07-04 12:12:27 +02:00
|
|
|
|
2022-07-04 13:58:45 +02:00
|
|
|
- name: Zip linux files
|
2024-08-31 03:42:07 +02:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_linux_x86_64_v${{ env.DATE }}.${{ env.COUNT }}.zip bin/ LICENSE resources/ restore.sh README.md saved/
|
2022-12-27 01:18:55 +01:00
|
|
|
|
|
|
|
- name: Move linux binaries and other files
|
|
|
|
run: |
|
2023-01-20 11:43:25 +01:00
|
|
|
rm -r ./bin/linux/x86_64
|
|
|
|
cp -R ./exclude/bin/linux/arm64 ./bin/linux
|
|
|
|
|
|
|
|
- name: Zip linux arm64 files
|
2024-08-31 03:42:07 +02:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_linux_arm64_v${{ env.DATE }}.${{ env.COUNT }}.zip bin/ LICENSE resources/ restore.sh README.md saved/
|
2023-01-20 11:43:25 +01:00
|
|
|
|
|
|
|
- name: Move linux arm64 binaries and other files
|
|
|
|
run: |
|
2023-02-04 07:43:34 +01:00
|
|
|
rm -r ./bin/linux/arm64
|
2023-03-04 11:35:14 +01:00
|
|
|
cp -R ./exclude/bin/linux/armhf ./bin/linux
|
2023-01-17 03:19:51 +01:00
|
|
|
|
2023-03-04 11:35:14 +01:00
|
|
|
- name: Zip linux armhf files
|
2024-08-31 03:42:07 +02:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_linux_armhf_v${{ env.DATE }}.${{ env.COUNT }}.zip bin/ LICENSE resources/ restore.sh README.md saved/
|
2023-01-17 03:19:51 +01:00
|
|
|
|
2023-03-04 11:35:14 +01:00
|
|
|
- name: Move linux armhf binaries and other files
|
2023-08-05 17:00:27 +02:00
|
|
|
run: rm -r ./bin/linux
|
2022-07-14 10:49:13 +02:00
|
|
|
|
2023-04-02 12:18:44 +02:00
|
|
|
- name: Copy exclude files back
|
|
|
|
run: cp -R ./exclude/bin/* ./bin
|
2022-07-14 10:49:13 +02:00
|
|
|
|
|
|
|
- name: Zip complete files
|
2024-08-31 03:42:07 +02:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_complete_v${{ env.DATE }}.${{ env.COUNT }}.zip bin/ LICENSE resources/ restore.cmd restore.sh README.md saved/
|
2023-04-02 12:18:44 +02:00
|
|
|
|
2023-04-05 06:03:16 +02:00
|
|
|
- name: Create this file to get latest git hash
|
2023-04-02 12:18:44 +02:00
|
|
|
run: |
|
2023-08-05 17:00:27 +02:00
|
|
|
echo "This file is for version checking purposes only. Get the correct zip file for your platform in the release assets." > README.txt
|
2023-04-05 06:03:16 +02:00
|
|
|
zip -r git-hash_${{ env.DATE_OLD }}-${{ env.SHA_SHORT }}.zip README.txt
|
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: |
|
2023-04-05 06:03:16 +02:00
|
|
|
git-hash_${{ env.DATE_OLD }}-${{ env.SHA_SHORT }}.zip
|
2023-04-02 12:18:44 +02:00
|
|
|
${{ github.event.repository.name }}_complete_v${{ env.DATE }}.${{ env.COUNT }}.zip
|
|
|
|
${{ github.event.repository.name }}_macos_v${{ env.DATE }}.${{ env.COUNT }}.zip
|
|
|
|
${{ github.event.repository.name }}_linux_armhf_v${{ env.DATE }}.${{ env.COUNT }}.zip
|
|
|
|
${{ github.event.repository.name }}_linux_arm64_v${{ env.DATE }}.${{ env.COUNT }}.zip
|
|
|
|
${{ github.event.repository.name }}_linux_x86_64_v${{ env.DATE }}.${{ env.COUNT }}.zip
|