mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-21 10:10:17 +00:00
ci: update build actions
This commit is contained in:
parent
4a09dc210a
commit
cd2e3f51ca
@ -1,6 +1,9 @@
|
|||||||
name: Build UI from latest `arcaea-offline-*` dependencies
|
name: Build UI from latest `arcaea-offline-*` dependencies
|
||||||
run-name: ${{ github.actor }} started a build request.
|
run-name: ${{ github.actor }} started a build request.
|
||||||
on: [workflow_dispatch]
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
@ -8,16 +11,16 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: "3.11"
|
||||||
|
|
||||||
# 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 nuitka imageio"
|
||||||
- name: Install UPX
|
- name: Install UPX
|
||||||
uses: crazy-max/ghaction-upx@v3
|
uses: crazy-max/ghaction-upx@v3
|
||||||
with:
|
with:
|
||||||
@ -25,11 +28,11 @@ jobs:
|
|||||||
|
|
||||||
# release builtin files
|
# release builtin files
|
||||||
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
||||||
- run: 'python prebuild.py'
|
- run: "python prebuild.py"
|
||||||
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
||||||
|
|
||||||
# build
|
# 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'
|
- 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
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -1,6 +1,16 @@
|
|||||||
name: Build UI
|
name: Build UI
|
||||||
run-name: ${{ github.actor }} started a build request.
|
run-name: ${{ github.actor }} started a build request.
|
||||||
on: [workflow_dispatch]
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
discussions: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
@ -8,14 +18,14 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.11'
|
python-version: "3.11"
|
||||||
cache: 'pip'
|
cache: "pip"
|
||||||
|
|
||||||
# install dependencies
|
# install dependencies
|
||||||
- run: 'pip install -r requirements.txt'
|
- run: "pip install -r requirements.txt"
|
||||||
- run: 'pip install nuitka imageio'
|
- run: "pip install nuitka imageio"
|
||||||
- name: Install UPX
|
- name: Install UPX
|
||||||
uses: crazy-max/ghaction-upx@v3
|
uses: crazy-max/ghaction-upx@v3
|
||||||
with:
|
with:
|
||||||
@ -23,13 +33,17 @@ jobs:
|
|||||||
|
|
||||||
# release builtin files
|
# release builtin files
|
||||||
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
- run: 'pyside6-lrelease.exe .\ui\resources\lang\en_US.ts .\ui\resources\lang\zh_CN.ts'
|
||||||
- run: 'python prebuild.py'
|
- run: "python prebuild.py"
|
||||||
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
- run: 'pyside6-rcc.exe .\ui\resources\resources.qrc -o .\ui\resources\resources_rc.py'
|
||||||
|
|
||||||
# build
|
# 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'
|
- 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
|
- name: Draft a release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
name: build-windows
|
discussion_category_name: New releases
|
||||||
path: index.exe
|
draft: true
|
||||||
|
generate_release_notes: true
|
||||||
|
files: |
|
||||||
|
index.exe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user