Skip to content

Address Issue, Restrict to Python < 3.13, and Allow 2-Digit TIDAL IDs… #160

Address Issue, Restrict to Python < 3.13, and Allow 2-Digit TIDAL IDs…

Address Issue, Restrict to Python < 3.13, and Allow 2-Digit TIDAL IDs… #160

---
name: Pyinstaller Build for Windows 64-bit on windows-latest
on:
release:
types: ["published"]
push:
branches: ["develop", "trunk"]
permissions:
contents: write
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Cache downloaded ffmpeg.exe
uses: actions/cache@v4
id: cache-ffmpeg-exe
with:
path: ${{ github.workspace }}\ffmpeg.exe
key: ffmpeg-n7.0-from-media-autobuild-suite
- name: Download ffmpeg binary if not found
if: steps.cache-ffmpeg-exe.outputs.cache-hit != 'true'
shell: pwsh
run: |
Invoke-WebRequest "https://github.com/ebb-earl-co/media-autobuild_suite/releases/download/n7.0/ffmpeg.exe" -OutFile "ffmpeg.exe"
- name: Cache UPX 4.2.3 zip downloaded from GitHub
uses: actions/cache@v4
id: cache-upx-423
with:
path: ~\AppData\Local\upx-4.2.3-win64.zip
key: upx-423-from-github
- name: Download UPX binary if not found
if: steps.cache-upx-423.outputs.cache-hit != 'true'
shell: pwsh
run: |
Invoke-WebRequest "https://github.com/upx/upx/releases/download/v4.2.3/upx-4.2.3-win64.zip" -OutFile "~\AppData\Local\upx-4.2.3-win64.zip"
- name: Install UPX tool
shell: pwsh
run: |
Expand-Archive "~\AppData\Local\upx-4.2.3-win64.zip" -DestinationPath "~\AppData\Local\upx-4.2.3-win64"
- name: Set up Python
uses: actions/setup-python@v5
with:
architecture: "x64"
cache: "pip"
python-version: "3.12.3"
- name: Install Python dependencies
shell: pwsh
run: |
python.exe -m venv .\venv
& .\venv\Scripts\activate
pip install --upgrade pip setuptools wheel
pip install pyinstaller==6.7.0 pypiwin32==223
pip install -r requirements.txt
- name: Create Executable with Pyinstaller
run: |
& .\venv\Scripts\activate
pyinstaller `
--name tidal-wave_windows.exe `
--paths tidal_wave `
--add-binary "ffmpeg.exe:." `
--exclude-module pyinstaller `
--clean `
--upx-dir "~\AppData\Local\upx-4.2.3-win64" `
--onefile `
.\pyinstaller.py
- name: Test just-compiled binary
shell: pwsh
run: |
& .\dist\tidal-wave_windows.exe --help
- name: Create SHA256 checksum file of just-compiled binary
shell: pwsh
run: |
python.exe -c "from hashlib import sha256;from pathlib import Path;Path('tidal-wave_windows.exe.sha256').write_text(f'''{sha256(Path('./dist/tidal-wave_windows.exe').read_bytes()).hexdigest()}\ttidal-wave_windows.exe''')"
cat tidal-wave_windows.exe.sha256
- name: Upload Artifact
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
compression-level: 9
name: tidal-wave_windows
overwrite: true
path: |
.\dist\tidal-wave_windows.exe
.\tidal-wave_windows.exe.sha256
retention-days: 7
- name: Add artifact to release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: |
.\dist\tidal-wave_windows.exe
.\tidal-wave_windows.exe.sha256
token: ${{ github.token }}