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