exe flow #1
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 Windows Executable | |
on: | |
push: | |
tags: | |
- 'v*' # 当推送带 v 前缀的标签时触发,如 v1.0.0 | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install uv | |
run: | | |
python -m pip install uv | |
- name: Install dependencies | |
run: | | |
uv venv | |
uv pip install -e . | |
uv pip install pyinstaller | |
- name: Build with PyInstaller | |
run: | | |
pyinstaller --noconfirm --onefile --windowed ` | |
--add-data "think_mcp_host;think_mcp_host" ` | |
--name think-mcp-host ` | |
think_mcp_host/destiny_host.py | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: dist/think-mcp-host.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |