This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- main | |
env: | |
PYTHON_VERSION: '3.11' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
environment: dev | |
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: actions/upload-artifact@v4 | |
with: | |
name: DDNetToolBox-${{ runner.os }}-dev${{ matrix.os == 'windows-latest' && '.exe' || '' }} | |
path: build/DDNetToolBox${{ matrix.os == 'windows-latest' && '.exe' || '' }} | |
compression-level: 0 |