-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.69 KB
/
Copy pathbuild-release.yml
File metadata and controls
53 lines (45 loc) · 1.69 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
46
47
48
49
50
51
52
53
name: Build and Release for Windows
# Si attiva quando crei un nuovo tag che inizia con 'v' (es. v1.0, v1.0.1)
on:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
# 1. Scarica il codice del repository
- name: Checkout repository
uses: actions/checkout@v4
# 2. Imposta l'ambiente Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11' # Puoi usare la versione che preferisci
# 3. Installa le dipendenze del progetto
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
# 4. Compila l'applicazione con PyInstaller
- name: Build executable with PyInstaller
run: |
pyinstaller --name="GoProProxyTool" --noconsole --onefile --icon="assets/icon.ico" --collect-all customtkinter --collect-all tkinterdnd2 main.py
# 5. Prepara l'artefatto per la release (lo zippa)
- name: Package release artifact
run: |
$TAG_NAME = "${{ github.ref_name }}"
Compress-Archive -Path dist/GoProProxyTool.exe -DestinationPath "GoProProxyTool-windows-${TAG_NAME}.zip"
shell: pwsh
# 6. Crea la Release su GitHub e carica lo ZIP
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
# Il corpo della release conterrà automaticamente le note generate
generate_release_notes: true
# Carica il file ZIP creato nello step precedente
files: |
GoProProxyTool-windows-*.zip