Files
Onekey/.github/workflows/dev.yml
ikun0014 3f4d327f6e 修复Nuitka编译未包含icon.jpg的问题
在dev.yml和release.yml的编译步骤中,新增--include-data-file参数,确保icon.jpg被正确打包进可执行文件,避免因缺失图标文件导致的运行异常。
2025-10-12 17:04:49 +08:00

42 lines
1.5 KiB
YAML

name: DEV Test Build
on:
workflow_dispatch:
jobs:
build:
permissions:
contents: write
runs-on: windows-latest
steps:
- name: 拉取仓库
uses: actions/checkout@v4
- name: 获取版本
shell: powershell
run: |
$version = (Get-Content package.json | ConvertFrom-Json).version
echo "PACKAGE_VERSION=$version" >> $env:GITHUB_ENV
- name: 安装Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: 安装依赖
run: |
python -m pip install --upgrade pip
pip install imageio
pip install -r requirements.txt
pip install nuitka
- name: 编译
run: |
python -m nuitka --standalone --onefile --assume-yes-for-downloads --show-memory --show-progress --onefile-tempdir-spec="%TEMP%\\onekey_%PID%_%TIME%" --windows-icon-from-ico="icon.jpg" --company-name="ikunshare" --product-name="Onekey" --file-version="${{ env.PACKAGE_VERSION }}" --product-version="${{ env.PACKAGE_VERSION }}" --file-description="Onekey Depot Manifest Downloader." --copyright="Copyright © 2025 ikunshare All Rights Reserved." --include-data-dir="web=web" --output-dir="build" --output-filename="Onekey_v${{ env.PACKAGE_VERSION }}.exe" --include-data-file="./icon.jpg=./icon.jpg" main.py
- name: 上传包
uses: actions/upload-artifact@v4
with:
name: Onekey_v${{ env.PACKAGE_VERSION }}.exe
path: build/Onekey_v${{ env.PACKAGE_VERSION }}.exe