ci: build actions improve

This commit is contained in:
283375 2023-11-01 21:25:51 +08:00
parent 3cd187fde3
commit d63d2f0d8b
Signed by: 283375
SSH Key Fingerprint: SHA256:UcX0qg6ZOSDOeieKPGokA5h7soykG61nz2uxuQgVLSk
2 changed files with 36 additions and 3 deletions

View File

@ -1,8 +1,8 @@
name: '[Windows] Build from latest arcaea-offline-* dependencies'
name: Build UI from latest `arcaea-offline-*` dependencies
run-name: ${{ github.actor }} started a build request.
on: [workflow_dispatch]
jobs:
build-ui:
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
@ -31,5 +31,5 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: index.exe
name: build-windows
path: index.exe

33
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build UI
run-name: ${{ github.actor }} started a build request.
on: [workflow_dispatch]
jobs:
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
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'
- uses: actions/upload-artifact@v3
with:
name: build-windows
path: index.exe