56 lines
1.3 KiB
YAML
56 lines
1.3 KiB
YAML
name: Build & Release (Windows)
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch: {}
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
shell: pwsh
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -r requirements.txt
|
|
python -m pip install pyinstaller
|
|
|
|
- name: Build (PyInstaller spec)
|
|
shell: pwsh
|
|
run: |
|
|
pyinstaller --noconfirm --clean main.spec
|
|
|
|
- name: Upload build artifact (push/dispatch)
|
|
if: startsWith(github.ref, 'refs/heads/') || github.event_name == 'workflow_dispatch'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: image_processor-windows
|
|
path: |
|
|
dist/**
|
|
|
|
- name: Create GitHub Release (tags)
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
name: ${{ github.ref_name }}
|
|
tag_name: ${{ github.ref_name }}
|
|
generate_release_notes: true
|
|
files: |
|
|
dist/**
|