67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
name: Release Windows Binaries
|
|
|
|
on:
|
|
release:
|
|
types: [published, created]
|
|
push:
|
|
tags:
|
|
- '*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Release tag (optional)'
|
|
required: false
|
|
|
|
jobs:
|
|
release-windows:
|
|
name: Build & Release Windows Binaries
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
continue-on-error: true
|
|
|
|
- name: Install Dependencies
|
|
shell: powershell
|
|
run: |
|
|
$py = "python"
|
|
if (-not (Get-Command "python" -ErrorAction SilentlyContinue)) {
|
|
if (Get-Command "py" -ErrorAction SilentlyContinue) {
|
|
$py = "py -3.12"
|
|
}
|
|
}
|
|
& $py -m pip install --upgrade pip
|
|
& $py -m pip install pyinstaller -r compilation/requirements.txt
|
|
|
|
- name: Compile Standalone Windows Binaries
|
|
shell: powershell
|
|
run: |
|
|
$py = "python"
|
|
if (-not (Get-Command "python" -ErrorAction SilentlyContinue)) {
|
|
if (Get-Command "py" -ErrorAction SilentlyContinue) {
|
|
$py = "py -3.12"
|
|
}
|
|
}
|
|
& $py compilation/package_dist.py --target windows
|
|
|
|
- name: Publish Windows Release Assets
|
|
shell: powershell
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.TAG_TOKEN || github.token }}
|
|
GITEA_SERVER_URL: ${{ github.server_url }}
|
|
GITEA_REPOSITORY: ${{ github.repository }}
|
|
GITEA_REF_NAME: ${{ github.event.release.tag_name || inputs.tag || github.ref_name }}
|
|
run: |
|
|
$py = "python"
|
|
if (-not (Get-Command "python" -ErrorAction SilentlyContinue)) {
|
|
if (Get-Command "py" -ErrorAction SilentlyContinue) {
|
|
$py = "py -3.12"
|
|
}
|
|
}
|
|
& $py compilation/upload_release.py --skip-build
|