mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-11 13:40:17 +00:00
ci: update build actions
* Switch to official Nuitka GitHub Actions * Adding Linux build support * Upgrade deprecated actions
This commit is contained in:
parent
4f864611ee
commit
bf034d1397
@ -1,40 +1,65 @@
|
|||||||
name: Build UI from latest `arcaea-offline-*` dependencies
|
name: Build Executable from latest `arcaea-offline-*` dependencies
|
||||||
run-name: ${{ github.actor }} started a build request.
|
run-name: ${{ github.actor }} started a build request.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
discussions: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build:
|
||||||
runs-on: windows-2022
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
|
cache: "pip"
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
- run: "pip install -r requirements.txt"
|
- run: "pip install -r requirements.txt"
|
||||||
- run: "pip uninstall arcaea-offline arcaea-offline-ocr -y"
|
- run: "pip uninstall arcaea-offline arcaea-offline-ocr -y"
|
||||||
- run: "pip install git+https://github.com/283375/arcaea-offline"
|
- run: "pip install git+https://github.com/283375/arcaea-offline"
|
||||||
- run: "pip install git+https://github.com/283375/arcaea-offline-ocr"
|
- run: "pip install git+https://github.com/283375/arcaea-offline-ocr"
|
||||||
- run: "pip install nuitka imageio"
|
- run: "pip install imageio"
|
||||||
- name: Install UPX
|
- name: Install UPX
|
||||||
uses: crazy-max/ghaction-upx@v3
|
uses: crazy-max/ghaction-upx@v3
|
||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
|
|
||||||
# release builtin files
|
- name: Release builtin files
|
||||||
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
run: |
|
||||||
- run: "python prebuild.py"
|
pyside6-lrelease ui/resources/lang/en_US.ts ui/resources/lang/zh_CN.ts
|
||||||
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
python prebuild.py
|
||||||
|
pyside6-rcc ui/resources/resources.qrc -o ui/resources/resources_rc.py
|
||||||
|
|
||||||
# build
|
- name: Build Executable
|
||||||
- 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: Nuitka/Nuitka-Action@main
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: build-windows
|
nuitka-version: main
|
||||||
path: index.exe
|
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/**/*
|
||||||
|
55
.github/workflows/build.yml
vendored
55
.github/workflows/build.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Build UI
|
name: Build Executable
|
||||||
run-name: ${{ github.actor }} started a build request.
|
run-name: ${{ github.actor }} started a build request.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -12,32 +12,59 @@ permissions:
|
|||||||
discussions: write
|
discussions: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build:
|
||||||
runs-on: windows-2022
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
cache: "pip"
|
cache: "pip"
|
||||||
|
|
||||||
# install dependencies
|
- name: Install dependencies
|
||||||
- run: "pip install -r requirements.txt"
|
run: |
|
||||||
- run: "pip install nuitka imageio"
|
pip install -r requirements.txt
|
||||||
|
pip install imageio
|
||||||
|
|
||||||
- name: Install UPX
|
- name: Install UPX
|
||||||
uses: crazy-max/ghaction-upx@v3
|
uses: crazy-max/ghaction-upx@v3
|
||||||
with:
|
with:
|
||||||
install-only: true
|
install-only: true
|
||||||
|
|
||||||
# release builtin files
|
- name: Release builtin files
|
||||||
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
run: |
|
||||||
- run: "python prebuild.py"
|
pyside6-lrelease ui/resources/lang/en_US.ts ui/resources/lang/zh_CN.ts
|
||||||
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
python prebuild.py
|
||||||
|
pyside6-rcc ui/resources/resources.qrc -o ui/resources/resources_rc.py
|
||||||
|
|
||||||
# build
|
- name: Build Executable
|
||||||
- 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: 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
|
- name: Draft a release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
@ -46,4 +73,6 @@ jobs:
|
|||||||
draft: true
|
draft: true
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: |
|
files: |
|
||||||
index.exe
|
build/*.exe
|
||||||
|
build/*.bin
|
||||||
|
build/*.app/**/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user