mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-04 10:20:18 +00:00
* Switch to official Nuitka GitHub Actions * Adding Linux build support * Upgrade deprecated actions
79 lines
1.8 KiB
YAML
79 lines
1.8 KiB
YAML
name: Build Executable
|
|
run-name: ${{ github.actor }} started a build request.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
|
|
permissions:
|
|
contents: write
|
|
discussions: write
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest]
|
|
fail-fast: false
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: "pip"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
pip install imageio
|
|
|
|
- name: Install UPX
|
|
uses: crazy-max/ghaction-upx@v3
|
|
with:
|
|
install-only: true
|
|
|
|
- name: Release builtin files
|
|
run: |
|
|
pyside6-lrelease ui/resources/lang/en_US.ts ui/resources/lang/zh_CN.ts
|
|
python prebuild.py
|
|
pyside6-rcc ui/resources/resources.qrc -o ui/resources/resources_rc.py
|
|
|
|
- name: Build Executable
|
|
uses: Nuitka/Nuitka-Action@main
|
|
with:
|
|
nuitka-version: main
|
|
script-name: index.py
|
|
standalone: true
|
|
onefile: true
|
|
enable-plugins: pyside6,upx
|
|
windows-icon-from-ico: ui/resources/images/icon.png
|
|
linux-icon: ui/resources/images/icon.png
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ runner.os }} Build
|
|
path: |
|
|
build/*.exe
|
|
build/*.bin
|
|
build/*.app/**/*
|
|
|
|
- name: Draft a release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
discussion_category_name: New releases
|
|
draft: true
|
|
generate_release_notes: true
|
|
files: |
|
|
build/*.exe
|
|
build/*.bin
|
|
build/*.app/**/*
|