没有requirements.txt依赖表的话首先输入
pip freeze > requirements.txt
生成一下依赖列表
去github创建一个src目录
将py,spces和依赖都放进去

然后在.github/workflows/
随便创建一个文件,我叫ci.yml
name: Package Application with Pyinstaller
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Package Application
uses: JackMcKew/pyinstaller-action-windows@main
with:
path: src
- uses: actions/upload-artifact@v2
with:
name: name-of-artifact
path: src/dist/windows
构建成功了就会在Github Actions里任务的最下面显示构建的文件
