feat: AI全代理模式 + 版本自动检查(v1.5.4) #7
Workflow file for this run
This file contains hidden or 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
| name: Build Engine | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # 触发:推送 v1.2.3 格式的 tag | |
| workflow_dispatch: # 允许手动触发(调试用) | |
| permissions: | |
| contents: write # 允许创建 Release 并上传附件 | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| artifact_name: testpilot-engine-windows.exe | |
| exe_path: dist/testpilot-engine.exe | |
| - os: macos-latest | |
| artifact_name: testpilot-engine-macos | |
| exe_path: dist/testpilot-engine | |
| - os: ubuntu-latest | |
| artifact_name: testpilot-engine-linux | |
| exe_path: dist/testpilot-engine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Poetry | |
| run: pip install poetry | |
| - name: Configure Poetry virtualenv | |
| run: poetry config virtualenvs.in-project true | |
| - name: Cache Poetry venv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-py310-${{ hashFiles('poetry.lock') }} | |
| restore-keys: | | |
| venv-${{ runner.os }}-py310- | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --no-root | |
| - name: Install Playwright browsers | |
| run: poetry run playwright install chromium | |
| - name: Install PyInstaller | |
| run: poetry run pip install pyinstaller --quiet | |
| - name: Build with PyInstaller | |
| run: poetry run pyinstaller testpilot_engine.spec --clean --noconfirm | |
| - name: Rename artifact (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: mv dist/testpilot-engine.exe dist/${{ matrix.artifact_name }} | |
| shell: bash | |
| - name: Rename artifact (macOS/Linux) | |
| if: matrix.os != 'windows-latest' | |
| run: mv dist/testpilot-engine dist/${{ matrix.artifact_name }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: dist/${{ matrix.artifact_name }} | |
| retention-days: 7 | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts/ | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: TestPilot Engine ${{ github.ref_name }} | |
| body: | | |
| ## TestPilot AI 引擎 ${{ github.ref_name }} | |
| 下载对应平台的引擎文件,放到任意目录后双击运行即可。 | |
| 无需安装 Python、Node.js 或任何依赖。 | |
| | 平台 | 文件 | 说明 | | |
| |------|------|------| | |
| | Windows | `testpilot-engine-windows.exe` | 双击运行 | | |
| | macOS | `testpilot-engine-macos` | `chmod +x` 后运行 | | |
| | Linux | `testpilot-engine-linux` | `chmod +x` 后运行 | | |
| 引擎启动后在 `http://127.0.0.1:8900` 提供服务,VS Code 插件会自动连接。 | |
| files: | | |
| artifacts/testpilot-engine-windows.exe/testpilot-engine-windows.exe | |
| artifacts/testpilot-engine-macos/testpilot-engine-macos | |
| artifacts/testpilot-engine-linux/testpilot-engine-linux | |
| draft: false | |
| prerelease: false |