Skip to content

Build and Release EXE #2

Build and Release EXE

Build and Release EXE #2

Workflow file for this run

name: Build and Release EXE
on:
push:
branches:
- dev
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # 替换为你的 Python 版本
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: Build EXE
run: |
pyinstaller main.spec
- name: Upload EXE to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/* # 假设生成的EXE文件在dist目录下
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}