-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.18 KB
/
Copy pathbuild.yml
File metadata and controls
42 lines (34 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build Windows Executable
on:
[push, workflow_dispatch]
jobs:
build:
runs-on: windows-latest
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[run ci]')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build executable with PyInstaller
run: |
pyinstaller --noconsole --onefile --name MonsterBattle --add-data "images;images" --add-data "audio;audio" code\main.py
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: MonsterBattle-Windows
path: dist/MonsterBattle.exe
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.run_number }}
name: Monster Battle v${{ github.run_number }}
files: dist/MonsterBattle.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}