-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.18 KB
/
build.yml
File metadata and controls
45 lines (37 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
43
44
45
name: Build and Release
on:
push:
tags:
- "v*" # Triggers on tags like v1.0.0, v1.1.0, etc.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true # Opt into Node.js 24 now
permissions:
contents: write # This allows creating releases
jobs:
build:
runs-on: windows-latest
steps:
# 1. Download your source code
- name: Checkout code
uses: actions/checkout@v4
# 2. Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
# 3. Install all your dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
# 4. Build the .exe with PyInstaller
- name: Build executable
run: |
pyinstaller --onefile --windowed --name "MyLib" --icon="resources/Icons/library.png" main.py
# 5. Publish the release and attach the .exe
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/MyLib.exe
generate_release_notes: true # Auto-generates changelog from commits