Skip to content

Refactor the main.py and add LogHelper.py #4

Refactor the main.py and add LogHelper.py

Refactor the main.py and add LogHelper.py #4

Workflow file for this run

name: Nuitka Packaging
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9' # 根据你的项目需求选择合适的 Python 版本
- name: Cache Python dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Nuitka
run: pip install nuitka
- name: Build with Nuitka
run: |
nuitka --onefile --output-dir=out3 --assume-yes-for-downloads main.py
- name: Check output directory
run: |
dir out3 # 在 Windows 上列出 out3 目录的内容
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: nuitka-build
path: out3/main.exe