-
-
Notifications
You must be signed in to change notification settings - Fork 71
253 lines (225 loc) · 8 KB
/
release.yml
File metadata and controls
253 lines (225 loc) · 8 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
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
name: Release
on:
workflow_dispatch:
inputs:
version:
description: "The new version number (e.g., 1.1)"
required: true
changelog:
description: "The changelog for this version"
required: true
env:
FORCE_COLOR: true
jobs:
create-tag:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Create Git Tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag "v${{ github.event.inputs.version }}" || echo "Tag creation failed (possibly already exists)."
git push origin "v${{ github.event.inputs.version }}" || echo "Tag push failed (possibly already exists)."
build_windows:
runs-on: windows-latest
needs: create-tag
strategy:
matrix:
build_type: [Release, Debug]
steps:
- uses: actions/checkout@v4
- name: Set Release variable
run: |
echo "RELEASE=${{ matrix.build_type }}" >> $env:GITHUB_ENV
- name: Set up Python 3.13
uses: actions/setup-python@v3
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if (Test-Path requirements.txt) {
pip install -r requirements.txt
}
"__version__ = '${{ github.event.inputs.version }}'" | Out-File -FilePath _version.py -Encoding utf8
- name: Build Executable
run: |
Write-Host "Release variable is set to: $env:Release"
if ($env:Release -eq 'Release') {
nuitka `
--assume-yes-for-downloads `
--show-scons `
--clang `
--lto=yes `
--jobs=4 `
--static-libpython=no `
--standalone `
--enable-plugin=anti-bloat `
--show-modules `
--show-anti-bloat-changes `
--follow-stdlib `
--follow-imports `
--nofollow-import-to="*.tests" `
--nofollow-import-to="pydoc" `
--nofollow-import-to="test" `
--prefer-source-code `
--include-module=unittest `
--include-module=seleniumwire `
--include-module=blinker._saferef `
--include-package-data=seleniumwire `
--windows-console-mode=disable `
--plugin-enable=pyside6 `
--windows-company-name="Loukious" `
--windows-product-name="StreamLabs TikTok Stream Key Generator" `
--windows-file-version="${{ github.event.inputs.version }}" `
--windows-product-version="${{ github.event.inputs.version }}" `
--windows-file-description="StreamLabs TikTok Stream Key Generator" `
--copyright="Copyright © 2025 Loukious" `
StreamLabsTikTokStreamKeyGenerator.py
} else {
nuitka `
--assume-yes-for-downloads `
--show-scons `
--clang `
--lto=yes `
--jobs=4 `
--static-libpython=no `
--standalone `
--enable-plugin=anti-bloat `
--show-modules `
--show-anti-bloat-changes `
--follow-stdlib `
--follow-imports `
--nofollow-import-to="*.tests" `
--nofollow-import-to="pydoc" `
--nofollow-import-to="test" `
--prefer-source-code `
--include-module=unittest `
--include-module=seleniumwire `
--include-module=blinker._saferef `
--include-package-data=seleniumwire `
--plugin-enable=pyside6 `
StreamLabsTikTokStreamKeyGenerator.py
}
- name: Compress Executable
run: Compress-Archive -Path StreamLabsTikTokStreamKeyGenerator.dist\* -DestinationPath StreamLabsTikTokStreamKeyGenerator${{ matrix.build_type }}-win-${{ github.event.inputs.version }}.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.build_type }}
path: |
*.zip
build_macos:
runs-on: macos-latest
needs: create-tag
strategy:
matrix:
architecture: [x86_64, arm64]
build_type: [Release]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v3
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
echo "__version__ = '${{ github.event.inputs.version }}'" > _version.py
- name: Build Executable
run: |
arch -${{ matrix.architecture }} nuitka \
--assume-yes-for-downloads \
--show-scons \
--clang \
--lto=yes \
--jobs=4 \
--static-libpython=no \
--standalone \
--enable-plugin=anti-bloat \
--enable-plugin=pyside6 \
--include-package=certifi \
--include-module=seleniumwire \
--include-module=blinker \
--include-package-data=seleniumwire \
--prefer-source-code \
--macos-target-arch=${{ matrix.architecture }} \
--macos-create-app-bundle \
--macos-app-version="${{ github.event.inputs.version }}" \
--macos-app-name="StreamLabs TikTok Stream Key Generator" \
StreamLabsTikTokStreamKeyGenerator.py
- name: Compress Executable
run: |
zip -r StreamLabsTikTokStreamKeyGenerator-${{ matrix.architecture }}-macos-${{ github.event.inputs.version }}.zip StreamLabsTikTokStreamKeyGenerator.app
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.architecture }}
path: |
*.zip
build_linux:
runs-on: ubuntu-22.04
needs: create-tag
strategy:
matrix:
build_type: [Release]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache python3-pip zip python3-distutils
python3 -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
echo "__version__ = '${{ github.event.inputs.version }}'" > _version.py
- name: Build Executable
run: |
nuitka \
--assume-yes-for-downloads \
--show-scons \
--clang \
--lto=yes \
--jobs=4 \
--static-libpython=no \
--standalone \
--enable-plugin=anti-bloat \
--enable-plugin=pyside6 \
--include-module=seleniumwire \
--include-module=blinker._saferef \
--include-package-data=seleniumwire \
--include-package=certifi \
--show-modules \
--show-anti-bloat-changes \
--follow-stdlib \
--follow-imports \
--prefer-source-code \
StreamLabsTikTokStreamKeyGenerator.py
- name: Compress Executable
run: zip -r StreamLabsTikTokStreamKeyGenerator-linux-${{ github.event.inputs.version }}.zip StreamLabsTikTokStreamKeyGenerator.dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux-
path: |
*.zip
release:
runs-on: ubuntu-latest
needs: [build_linux, build_windows, build_macos]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Create the release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ github.event.inputs.version }}"
body: ${{ github.event.inputs.changelog }}
files: "artifacts/**/*.zip"