Skip to content

Update build.yml

Update build.yml #230

Workflow file for this run

name: 打包为安装程序
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 检出仓库
uses: actions/checkout@v2
- name: 设置 Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: 安装依赖
run: |
python -m pip install --upgrade pip
pip install pyinstaller
- name: 安装 pkgconfiglite
run: |
- name: 打包应用程序
run: |
pyinstaller --onefile main.py
- name: 创建包含其他文件夹的目录
run: |
mkdir -p output
cp dist/Bloret-Launcher.exe output/
cp -r cmcl/ output/
cp -r icons/ output/
cp -r ui/ output/
cp config.ini output/
- name: 创建 zip 包含构建产物
run: |
cd output
zip -r Bloret-Launcher.zip Bloret-Launcher.exe cmcl icons ui config.ini
- name: 上传构建产物 Bloret-Launcher.zip
uses: actions/upload-artifact@v4
with:
name: Bloret-Launcher
path: output/Bloret-Launcher.zip
- name: 上传安装程序
uses: actions/upload-artifact@v4
with:
name: installer
path: dist/