-
Notifications
You must be signed in to change notification settings - Fork 2
152 lines (131 loc) · 3.82 KB
/
build.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Build GUI Applications
# git tag v1.2.6
# git push origin v1.2.6
on:
push:
tags:
- 'v*' # Se déclenche pour les tags de version
pull_request:
branches:
- main # Se déclenche pour les PRs vers main
workflow_dispatch: # Permet le déclenchement manuel
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt upgrade -y
sudo apt install -y \
libwxbase3.2-1 \
libwxgtk3.2-1 \
libwxgtk-media3.2-1 \
libwxgtk-webview3.2-1 \
python3-wxgtk4.0 \
python3-wxgtk-media4.0 \
python3-wxgtk-webview4.0 \
libgtk-3-dev \
python3-pip \
python-is-python3
- name: Install Gooey
run: |
pip install attrdict3
pip install gooey
pip install pyinstaller
- name: Install user dependencies
run: |
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
- name: Make package
run: |
pyinstaller --clean -y --dist ./dist/linux build_gui.spec
- uses: actions/upload-artifact@v4
with:
name: med_to_csv_linux
path: ./dist/linux
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Gooey
run: |
python -m pip install --upgrade pip
pip install gooey
pip install Pyinstaller
- name: Install user dependencies
run: |
if (Test-Path -Path "requirements.txt") {
pip install -r requirements.txt
}
- name: Make package
run: |
pyinstaller --clean -y --dist ./dist/windows build_gui.spec
- uses: actions/upload-artifact@v4
with:
name: med_to_csv_windows
path: ./dist/windows
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install wxPython dependencies
run: |
brew install pkg-config
brew install wxwidgets
- name: Install Gooey
run: |
pip3 install --upgrade pip
pip3 install wxPython
pip3 install gooey
pip3 install pyinstaller
- name: Install user dependencies
run: |
if [ -f requirements.txt ]; then
pip3 install -r requirements.txt
fi
- name: Make package
run: |
pyinstaller --clean -y --dist ./dist/mac build_gui.spec
- uses: actions/upload-artifact@v4
with:
name: med_to_csv_mac
path: ./dist/mac
create-release:
needs: [build-linux, build-windows, build-macos]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: List downloaded files
run: ls -R dist
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
body: |
# Release ${{ github.ref_name }}
Binaires disponibles pour :
- Windows
- Linux
- macOS
## Installation
Téléchargez le binaire correspondant à votre système d'exploitation.
draft: false
prerelease: false
files: |
dist/**/*.exe
dist/**/*.dmg
dist/**/*.tar.gz