Skip to content

合并拉取请求 #65 #19

合并拉取请求 #65

合并拉取请求 #65 #19

Workflow file for this run

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