1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+ workflow_dispatch :
8+
9+ jobs :
10+ build-windows :
11+ runs-on : windows-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Set up Python
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : ' 3.11'
19+
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install -r requirements.txt
24+ pip install pyinstaller
25+
26+ - name : Build Windows executable
27+ run : |
28+ python build_installers.py
29+
30+ - name : Upload Windows release
31+ uses : actions/upload-artifact@v3
32+ with :
33+ name : ForexSmartBot-Windows
34+ path : dist/ForexSmartBot.exe
35+
36+ build-linux :
37+ runs-on : ubuntu-latest
38+ steps :
39+ - uses : actions/checkout@v4
40+
41+ - name : Set up Python
42+ uses : actions/setup-python@v4
43+ with :
44+ python-version : ' 3.11'
45+
46+ - name : Install dependencies
47+ run : |
48+ python -m pip install --upgrade pip
49+ pip install -r requirements.txt
50+ pip install stdeb rpm
51+
52+ - name : Build Linux packages
53+ run : |
54+ python build_installers.py
55+
56+ - name : Upload Linux release
57+ uses : actions/upload-artifact@v3
58+ with :
59+ name : ForexSmartBot-Linux
60+ path : dist/
61+
62+ build-macos :
63+ runs-on : macos-latest
64+ steps :
65+ - uses : actions/checkout@v4
66+
67+ - name : Set up Python
68+ uses : actions/setup-python@v4
69+ with :
70+ python-version : ' 3.11'
71+
72+ - name : Install dependencies
73+ run : |
74+ python -m pip install --upgrade pip
75+ pip install -r requirements.txt
76+ pip install py2app
77+
78+ - name : Build macOS package
79+ run : |
80+ python build_installers.py
81+
82+ - name : Upload macOS release
83+ uses : actions/upload-artifact@v3
84+ with :
85+ name : ForexSmartBot-macOS
86+ path : dist/
87+
88+ create-release :
89+ needs : [build-windows, build-linux, build-macos]
90+ runs-on : ubuntu-latest
91+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
92+ steps :
93+ - uses : actions/checkout@v4
94+
95+ - name : Download all artifacts
96+ uses : actions/download-artifact@v3
97+
98+ - name : Create Release
99+ uses : softprops/action-gh-release@v1
100+ with :
101+ files : |
102+ ForexSmartBot-Windows/ForexSmartBot.exe
103+ ForexSmartBot-Linux/*
104+ ForexSmartBot-macOS/*
105+ generate_release_notes : true
106+ env :
107+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments