Update Run Build EXE.yml #12
This file contains 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: 构建 exe 文件 | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-x64: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.4' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Install PyInstaller | |
run: pip install pyinstaller | |
- name: Build EXE | |
run: pyinstaller --onefile --distpath dist/x64 main.py -i thinking.ico | |
- name: Rename built EXE | |
run: move dist/x64/main.exe "dist/x64/LiteLoaderQQNT Auto Patch_x64.exe" | |
- name: Upload artifact x64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LiteLoaderQQNT Auto Patch_x64.exe | |
path: "dist/x64/LiteLoaderQQNT Auto Patch_x64.exe" | |
build-x86: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.4' | |
architecture: 'x86' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- name: Install PyInstaller | |
run: pip install pyinstaller | |
- name: Build EXE | |
run: pyinstaller --onefile --distpath dist/x86 main.py -i thinking.ico | |
- name: Rename built EXE | |
run: move dist/x86/main.exe "dist/x86/LiteLoaderQQNT Auto Patch_x86.exe" | |
- name: Upload artifact x86 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: LiteLoaderQQNT Auto Patch_x86.exe | |
path: "dist/x86/LiteLoaderQQNT Auto Patch_x86.exe" |