Skip to content

Release v0.5.0

Release v0.5.0 #12

Workflow file for this run

name: Release Helvox
on:
push:
tags: [ "v*" ]
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
label: Windows
spec: windows.spec
upload_path: dist/Helvox.exe
verify_path: dist/Helvox.exe
pip_cache_dir: "~\\AppData\\Local\\pip\\Cache"
- os: macos-latest
label: macOS
spec: macos.spec
upload_path: dist/Helvox-macOS.zip
verify_path: dist/Helvox.app
pip_cache_dir: "~/Library/Caches/pip"
runs-on: ${{ matrix.os }}
env:
APP_NAME: Helvox
PYTHON_VERSION: "3.13"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ${{ matrix.pip_cache_dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Upgrade pip & build tools
run: python -m pip install --upgrade pip wheel "setuptools<70"
- name: Install project (build extras)
run: pip install ".[build]"
- name: Show build tool versions
shell: bash
run: |
python - <<'PY'
import setuptools
import PyInstaller
print("setuptools", setuptools.__version__)
print("pyinstaller", PyInstaller.__version__)
PY
- name: Verify tkinter
if: runner.os == 'macOS'
run: |
python -c "import tkinter; print(tkinter.TkVersion)"
- name: Install UPX
if: runner.os == 'Windows'
run: choco install upx -y
- name: Build (PyInstaller)
shell: bash
run: |
pyinstaller "${{ matrix.spec }}"
ls -la dist || dir dist
- name: Package macOS app
if: runner.os == 'macOS'
shell: bash
run: |
ditto -c -k --sequesterRsrc --keepParent "dist/${{ env.APP_NAME }}.app" "dist/${{ env.APP_NAME }}-macOS.zip"
- name: Verify output
shell: bash
run: |
test -e "${{ matrix.verify_path }}" || (echo "Expected build artifact not found: ${{ matrix.verify_path }}" && exit 1)
- name: Upload build artifacts (CI)
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{ matrix.label }}
path: ${{ matrix.upload_path }}
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
pattern: Helvox-*
path: release-assets
merge-multiple: true
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
release-assets/*
generate_release_notes: true
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}