-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (50 loc) · 1.75 KB
/
release-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on:
push:
tags:
- "v*.*.*"
env:
PYTHON_VERSION: '3.11'
name: release-build
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: '签出仓库'
uses: actions/checkout@v4
- name: 初始化 Python ${{ env.PYTHON_VERSION }} 环境
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: '使用 pip 安装依赖'
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install "PyQt-Fluent-Widgets[full]" -i https://pypi.org/simple/
pip install imageio
- name: 构建可执行文件
uses: Nuitka/[email protected]
with:
nuitka-version: main
script-name: main.py
onefile: true
windows-icon-from-ico: app/resource/logo.ico
enable-plugins: pyqt5
include-data-dir: |
./app=app
disable-console: true
output-file: ${{ matrix.os == 'ubuntu-latest' && 'main.bin' || (matrix.os == 'windows-latest' && 'main.exe' || 'main.bin') }}
output-dir: build
mingw64: true
macos-create-app-bundle: true
- name: '上传发行'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.TAG_NAME }}
file: ${{ matrix.os == 'ubuntu-latest' && 'build/main.bin' || (matrix.os == 'windows-latest' && 'build/main.exe' || 'build/main.bin') }}
asset_name: DDNetToolBox-${{ runner.os }}-${{ env.TAG_NAME }}${{ matrix.os == 'windows-latest' && '.exe' || '' }}
prerelease: true