From a98aa92313c30ebf17cee2d02e382a576747a3b7 Mon Sep 17 00:00:00 2001 From: SerStars <90714930+SerStars@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:39:14 +0200 Subject: [PATCH 1/4] Create build.yml --- .github/workflows/build.yml | 99 +++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6b24255 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,99 @@ +name: Build Nugget + +on: + workflow_dispatch: + inputs: + release_version: + description: 'Which version is this release?' + required: true + +jobs: + build-macos-intel: + runs-on: macos-13 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Build MacOS (Intel) + run: python3 compile.py + + - name: Zip Nugget.app (Intel) + run: | + cd dist + zip -r "Nugget_macOS_intel.zip" Nugget.app + + build-macos-arm: + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Build MacOS (ARM) + run: python3 compile.py + + - name: Zip Nugget.app (ARM) + run: | + cd dist + zip -r "Nugget_macOS_arm.zip" Nugget.app + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Build Windows + run: python compile.py + + - name: Zip Nugget + run: | + cd dist + Compress-Archive -Path Nugget -DestinationPath "Nugget_Windows.zip" + + create-release: + runs-on: ubuntu-latest + needs: [build-macos-intel, build-macos-arm, build-windows] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create Release + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + automatic_release_tag: ${{ github.event.inputs.release_version }} + files: | + dist/Nugget_macOS_intel.zip + dist/Nugget_macOS_arm.zip + dist/Nugget_Windows.zip From 6e6ed6015abd395a73896d58a169704454d8c54c Mon Sep 17 00:00:00 2001 From: SerStars <90714930+SerStars@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:41:40 +0200 Subject: [PATCH 2/4] Add PyInstaller --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c90a8d3..79be7cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pymobiledevice3 -pyside6 \ No newline at end of file +pyside6 +PyInstaller From 7cf36f083ef06faed762b72627b836d59a252a70 Mon Sep 17 00:00:00 2001 From: SerStars <90714930+SerStars@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:55:48 +0200 Subject: [PATCH 3/4] Update build.yml --- .github/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b24255..83cab1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,12 @@ jobs: cd dist zip -r "Nugget_macOS_intel.zip" Nugget.app + - name: Upload ZIP (Intel) + uses: actions/upload-artifact@v2 + with: + name: Nugget_macOS_intel + path: dist/Nugget_macOS_intel.zip + build-macos-arm: runs-on: macos-latest steps: @@ -56,6 +62,12 @@ jobs: cd dist zip -r "Nugget_macOS_arm.zip" Nugget.app + - name: Upload ZIP (ARM) + uses: actions/upload-artifact@v2 + with: + name: Nugget_macOS_arm + path: dist/Nugget_macOS_arm.zip + build-windows: runs-on: windows-latest steps: @@ -80,12 +92,30 @@ jobs: cd dist Compress-Archive -Path Nugget -DestinationPath "Nugget_Windows.zip" + - name: Upload ZIP (Windows) + uses: actions/upload-artifact@v2 + with: + name: Nugget_Windows + path: dist/Nugget_Windows.zip + create-release: runs-on: ubuntu-latest needs: [build-macos-intel, build-macos-arm, build-windows] steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Download ZIP (Intel) + uses: actions/download-artifact@v2 + with: + name: Nugget_macOS_intel + + - name: Download ZIP (ARM) + uses: actions/download-artifact@v2 + with: + name: Nugget_macOS_arm + + - name: Download ZIP (Windows) + uses: actions/download-artifact@v2 + with: + name: Nugget_Windows - name: Create Release uses: marvinpinto/action-automatic-releases@latest @@ -94,6 +124,6 @@ jobs: prerelease: false automatic_release_tag: ${{ github.event.inputs.release_version }} files: | - dist/Nugget_macOS_intel.zip - dist/Nugget_macOS_arm.zip - dist/Nugget_Windows.zip + Nugget_macOS_intel.zip + Nugget_macOS_arm.zip + Nugget_Windows.zip From 8cb24195dbd4c4bac7e7b14e44279be2a17fefe8 Mon Sep 17 00:00:00 2001 From: SerStars <90714930+SerStars@users.noreply.github.com> Date: Tue, 1 Oct 2024 00:57:19 +0200 Subject: [PATCH 4/4] Version fix --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83cab1a..29439c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: zip -r "Nugget_macOS_intel.zip" Nugget.app - name: Upload ZIP (Intel) - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Nugget_macOS_intel path: dist/Nugget_macOS_intel.zip @@ -63,7 +63,7 @@ jobs: zip -r "Nugget_macOS_arm.zip" Nugget.app - name: Upload ZIP (ARM) - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Nugget_macOS_arm path: dist/Nugget_macOS_arm.zip @@ -93,7 +93,7 @@ jobs: Compress-Archive -Path Nugget -DestinationPath "Nugget_Windows.zip" - name: Upload ZIP (Windows) - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Nugget_Windows path: dist/Nugget_Windows.zip @@ -103,17 +103,17 @@ jobs: needs: [build-macos-intel, build-macos-arm, build-windows] steps: - name: Download ZIP (Intel) - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: Nugget_macOS_intel - name: Download ZIP (ARM) - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: Nugget_macOS_arm - name: Download ZIP (Windows) - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: Nugget_Windows