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
|
|
|
|
|
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: |
|
2023-01-13 05:25:27 +01:00
|
|
|
mkdir -p ./exclude/lib ./exclude/bin
|
|
|
|
cp -R ./bin/* ./exclude/bin
|
|
|
|
cp ./resources/lib/* ./exclude/lib
|
|
|
|
rm -r ./bin/linux ./bin/windows ./resources/lib/*
|
2022-07-04 12:12:27 +02:00
|
|
|
|
2022-07-04 13:58:45 +02:00
|
|
|
- name: Zip macos files
|
2023-01-13 05:25:27 +01:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_macos_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE resources/ restore.sh README.md
|
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
|
|
|
|
cp ./exclude/lib/* ./resources/lib
|
|
|
|
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
|
2023-01-13 05:25:27 +01:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_linux_x86_64_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE resources/ restore.sh README.md
|
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
|
|
|
|
run: zip -r ${{ github.event.repository.name }}_linux_arm64_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE resources/ restore.sh README.md
|
|
|
|
|
|
|
|
- name: Move linux arm64 binaries and other files
|
|
|
|
run: |
|
|
|
|
rm -r ./bin/linux/arm64 ./resources/lib/*
|
2023-01-17 03:19:51 +01:00
|
|
|
cp -R ./exclude/bin/linux/arm ./bin/linux
|
|
|
|
|
|
|
|
- name: Zip linux arm files
|
|
|
|
run: zip -r ${{ github.event.repository.name }}_linux_arm_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE resources/ restore.sh README.md
|
|
|
|
|
|
|
|
- name: Move linux arm binaries and other files
|
|
|
|
run: |
|
|
|
|
rm -r ./bin/linux
|
2023-01-13 05:25:27 +01:00
|
|
|
cp -R ./exclude/bin/windows ./bin
|
2022-07-04 13:58:45 +02:00
|
|
|
|
|
|
|
- name: Zip win files
|
2023-01-13 05:25:27 +01:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_windows_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE resources/ restore.cmd restore.sh README.md
|
2022-07-14 10:49:13 +02:00
|
|
|
|
2023-01-13 05:25:27 +01:00
|
|
|
- name: Copy exclude files back and download other files
|
|
|
|
run: |
|
|
|
|
cp -R ./exclude/bin/* ./bin
|
|
|
|
cp -R ./exclude/lib/* ./resources/lib
|
|
|
|
./resources/complete.sh
|
2022-07-14 10:49:13 +02:00
|
|
|
|
|
|
|
- name: Zip complete files
|
2023-01-13 05:25:27 +01:00
|
|
|
run: zip -r ${{ github.event.repository.name }}_complete_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip bin/ LICENSE 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
|
2023-01-17 03:19:51 +01:00
|
|
|
${{ github.event.repository.name }}_linux_arm_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
|
2023-01-20 11:43:25 +01:00
|
|
|
${{ github.event.repository.name }}_linux_arm64_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
|
2022-12-27 01:18:55 +01:00
|
|
|
${{ github.event.repository.name }}_linux_x86_64_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
|
2023-01-13 05:25:27 +01:00
|
|
|
${{ github.event.repository.name }}_windows_${{ env.DATE }}-${{ env.SHA_SHORT }}.zip
|