Skip to content

Refines default TTS provider configuration via environment variable. #84

Refines default TTS provider configuration via environment variable.

Refines default TTS provider configuration via environment variable. #84

Workflow file for this run

name: Release Multi-Platform
permissions:
contents: write
on:
push:
tags:
- 'v*.*.*'
jobs:
build-arm64:
name: Build macOS ARM64
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.10.x'] # Use 'x' to explicitly request the latest patch version of 3.10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for setuptools-scm to determine the version
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ${{ runner.homedir }}/Library/Caches/pip # Use runner context for self-hosted compatibility
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install .[dev]
- name: Convert PNG to ICNS
run: sips -s format icns podcast.png --out podcast.icns
- name: Build executable ARM64
run: python -m PyInstaller "Podcast Generator.spec"
- name: Sign the application (ad-hoc)
run: codesign --force --deep --sign - "dist/Podcast Generator.app"
- name: Package ARM64 tar.gz
run: tar -czvf Podcast_Generator_${{ github.ref_name }}_MacOS_arm64.tar.gz -C dist "Podcast Generator.app"
- name: Upload ARM64 artifact
uses: actions/upload-artifact@v4
with:
name: dist-macos-arm64
path: Podcast_Generator_${{ github.ref_name }}_MacOS_arm64.tar.gz
build-intel:
name: Build macOS Intel
runs-on: [self-hosted, macos, x64] # This job runs on your local machine
steps:
- name: Install and set up Python 3.10 via Homebrew for self-hosted runner
run: |
# Install the python-tk formula, which guarantees the Tcl/Tk GUI toolkit is included.
# This is the definitive fix for "ModuleNotFoundError: No module named 'tkinter'".
brew install [email protected]
echo "$(brew --prefix [email protected])/bin" >> $GITHUB_PATH
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: python3.10 -m pip install .[dev]
- name: Convert PNG to ICNS
run: sips -s format icns podcast.png --out podcast.icns
- name: Build executable Intel
run: python3.10 -m PyInstaller "Podcast Generator.spec"
- name: Sign the application (ad-hoc)
run: codesign --force --deep --sign - "dist/Podcast Generator.app"
- name: Package Intel tar.gz
run: tar -czvf Podcast_Generator_${{ github.ref_name }}_MacOS_x86_64.tar.gz -C dist "Podcast Generator.app"
- name: Upload Intel artifact
uses: actions/upload-artifact@v4
with:
name: dist-macos-intel
path: Podcast_Generator_${{ github.ref_name }}_MacOS_x86_64.tar.gz
build-windows:
name: Build Windows
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.10.x'] # Use 'x' to explicitly request the latest patch version of 3.10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache # Path for pip cache on Windows
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install ImageMagick
run: choco install imagemagick -y
- name: Convert PNG to ICO
run: magick convert podcast.png -define icon:auto-resize=256,128,64,48,32,16 podcast.ico
- name: Install dependencies
run: pip install .[dev]
- name: Build Windows executable
run: python -m PyInstaller "Podcast Generator.spec"
- name: Package Windows tar.gz
run: tar -czvf Podcast_Generator_${{ github.ref_name }}_windows.tar.gz -C dist "Podcast Generator"
- name: Upload Windows ZIP artifact
uses: actions/upload-artifact@v4
with:
name: dist-windows
path: Podcast_Generator_${{ github.ref_name }}_windows.tar.gz
build-linux:
name: Build Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10.x'] # Use 'x' to explicitly request the latest patch version of 3.10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: pip install .[dev]
- name: Build executable Linux
run: python -m PyInstaller "Podcast Generator.spec"
- name: Package Linux tar.gz
run: tar -czvf Podcast_Generator_${{ github.ref_name }}_linux.tar.gz -C dist "Podcast Generator"
- name: Upload Linux artifact
uses: actions/upload-artifact@v4
with:
name: dist-linux
path: Podcast_Generator_${{ github.ref_name }}_linux.tar.gz
release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build-arm64, build-intel, build-windows, build-linux]
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
generate_release_notes: true
files: |
artifacts/dist-macos-arm64/*.tar.gz
artifacts/dist-macos-intel/*.tar.gz
artifacts/dist-windows/*.tar.gz
artifacts/dist-linux/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}