mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-19 09:10:18 +00:00
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Build UI
|
|
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-windows:
|
|
runs-on: windows-2022
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: "pip"
|
|
|
|
# install dependencies
|
|
- run: "pip install -r requirements.txt"
|
|
- run: "pip install nuitka imageio"
|
|
- name: Install UPX
|
|
uses: crazy-max/ghaction-upx@v3
|
|
with:
|
|
install-only: true
|
|
|
|
# release builtin files
|
|
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
|
- run: "python prebuild.py"
|
|
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
|
|
|
# build
|
|
- run: "python -m nuitka --plugin-enable=upx --enable-plugin=pyside6 --assume-yes-for-downloads --windows-icon-from-ico=./ui/resources/images/icon.png --standalone --onefile index.py"
|
|
|
|
- name: Draft a release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
discussion_category_name: New releases
|
|
draft: true
|
|
generate_release_notes: true
|
|
files: |
|
|
index.exe
|