-
Notifications
You must be signed in to change notification settings - Fork 4
55 lines (49 loc) · 1.52 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
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 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: DDNetToolBox
output-dir: build
mingw64: true
macos-create-app-bundle: true
- name: '上传发行'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
file: build/DDNetToolBox${{ matrix.os == 'windows-latest' && '.exe' || '' }}
asset_name: DDNetToolBox-${{ runner.os }}-${{ github.ref_name }}${{ matrix.os == 'windows-latest' && '.exe' || '' }}
prerelease: true