-
Notifications
You must be signed in to change notification settings - Fork 0
470 lines (423 loc) · 22 KB
/
main.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
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# Workflow tuningTrainer
name: tuningTrainer
on:
pull_request:
branches: [ ]
push:
branches: [ ]
create:
tags: ['v*'] # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
publish-www:
description: 'Publish on WWW'
required: false
type: boolean
publish-github:
description: 'Publish on GitHub'
required: false
type: boolean
env:
pkgname: tuningTrainer
jobs:
build:
strategy:
matrix:
include:
- { name: "windows-msvc", os: windows-latest, flags: "", shell: 'pwsh', deps-prefix: "D:/deps", aqt-os: "windows", aqt-arch: "win64_msvc2019_64", aqt-prefix: "D:/Qt", aqt-subdir: "msvc2019_64", qt-version: '6.5.1', msystem: 'UCRT64' }
- { name: "windows-mingw", os: windows-latest, flags: "", shell: 'msys2 {0}', deps-prefix: "D:/deps", aqt-os: "windows", aqt-arch: "win64_mingw", aqt-prefix: "D:/Qt", aqt-subdir: "mingw_64", qt-version: '6.5.1', msystem: 'UCRT64' }
- { name: "windows-mingw-qt5", os: windows-latest, flags: "", shell: 'msys2 {0}', deps-prefix: "/opt/deps", aqt-os: "windows", aqt-arch: "win64_mingw81", aqt-prefix: "/opt/Qt", aqt-subdir: "mingw81_64", qt-version: '5.15.2', msystem: 'MINGW64' }
- { name: "linux", os: ubuntu-latest, flags: "", shell: 'bash', deps-prefix: "/home/runner/deps", aqt-os: "linux", aqt-arch: "gcc_64", aqt-prefix: "/home/runner/Qt", aqt-subdir: "gcc_64", qt-version: '6.5.1' }
- { name: "macos-universal", os: macos-latest, flags: "-DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"", shell: 'bash', deps-prefix: "/Users/runner/deps", aqt-os: "mac", aqt-arch: "", aqt-prefix: "/Users/runner/Qt", aqt-subdir: "macos", qt-version: '6.5.1' }
- { name: "macos-legacy", os: macos-latest, flags: "-DCMAKE_OSX_DEPLOYMENT_TARGET=\"10.12\" -DCMAKE_OSX_ARCHITECTURES=\"x86_64\"", shell: 'bash', deps-prefix: "/Users/runner/deps", aqt-os: "mac", aqt-arch: "", aqt-prefix: "/Users/runner/Qt", aqt-subdir: "clang_64", qt-version: '5.12.12' }
runs-on: ${{matrix.os}}
defaults:
run:
shell: ${{matrix.shell}}
steps:
- name: Install the Apple certificate and provisioning profile
if: ${{runner.os == 'macOS'}}
env:
P12_CERTIFICATE_BASE64: ${{ secrets.P12_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo "IDENTITY_NAME=donarturo11.github.io" >> $GITHUB_ENV
echo -n "$P12_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security default-keychain -s $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH -T /usr/bin/codesign -T /usr/bin/productsign
security list-keychain -d user -s $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD $KEYCHAIN_PATH
security find-identity
- if: ${{runner.os == 'Windows'}}
name: Install MinGW
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
install: |
base base-devel p7zip zip git
- if: ${{runner.os == 'Windows'}}
name: Prepare MinGW
shell: 'msys2 {0}'
run: |
pacman -S --noconfirm \
${MINGW_PACKAGE_PREFIX}-toolchain \
${MINGW_PACKAGE_PREFIX}-python-pip \
${MINGW_PACKAGE_PREFIX}-python-distutils-extra \
${MINGW_PACKAGE_PREFIX}-python-psutil \
${MINGW_PACKAGE_PREFIX}-cmake \
${MINGW_PACKAGE_PREFIX}-nsis
- name: Setup windows env
if: ${{runner.os == 'Windows'}}
shell: 'msys2 {0}'
run: |
echo "::notify:: Upgrading pip"
python3 -m pip install -U pip
echo "SETUPTOOLS_USE_DISTUTILS=stdlib" >> $GITHUB_ENV
- name: Install Linux Dependencies
if: ${{runner.os == 'Linux'}}
run: |
sudo apt-get update
sudo apt-get install -y cmake-extras libasound2-dev \
libegl1-mesa-dev libfuse2 libpulse-dev
sudo apt-get install -y libunwind-dev \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-0 \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-libav \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad
sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 \
libxcb-cursor0 libxcb-cursor-dev \
libxcb-keysyms1-dev libxcb-randr0 \
libxcb-render-util0 libxcb-shape0
- name: Prepare flags for POSIX
if: ${{runner.name != 'windows-msvc'}}
shell: 'bash'
run: |
echo ":: Portaudio will be linked dynamicaly"
echo "PORTAUDIO_FLAGS=\"-DBUILD_SHARED_LIBS=1\"" >> $GITHUB_ENV
echo "STK_FLAGS=\"-DBUILD_SHARED=1\"" >> $GITHUB_ENV
- name: Prepare flags for MSVC
if: ${{runner.name == 'windows-msvc'}}
shell: 'msys2 {0}'
run: |
echo ":: Portaudio will be linked staticaly"
echo "PORTAUDIO_FLAGS=\"-DBUILD_SHARED_LIBS=1\"" >> $GITHUB_ENV
echo "STK_FLAGS=\"-DBUILD_SHARED=1\"" >> $GITHUB_ENV
- name: Install AQT (MacOS)
if: ${{runner.os == 'macOS'}}
run: |
python3 -m pip install --break-system-packages --user aqtinstall
- name: Install AQT (no MacOS)
if: ${{runner.os != 'macOS'}}
run: |
python3 -m pip install aqtinstall
- name: Install Qt
run: |
python3 -m aqt install-qt -O ${{matrix.aqt-prefix}} ${{matrix.aqt-os}} desktop ${{matrix.qt-version}} ${{matrix.aqt-arch}}
- name: Install Qt6 module
if: ${{matrix.qt-version == '6.5.1'}}
run: |
python3 -m aqt install-qt -O ${{matrix.aqt-prefix}} ${{matrix.aqt-os}} desktop ${{matrix.qt-version}} ${{matrix.aqt-arch}} -m qtmultimedia
- name: Install PortAudio
run: |
git clone https://github.com/portaudio/portaudio ../portaudio
cmake -S ../portaudio -B ../portaudio/build ${{matrix.flags}} -DCMAKE_BUILD_TYPE=Release ${{env.PORTAUDIO_FLAGS}}
cmake --build ../portaudio/build --config Release
cmake --install ../portaudio/build --config Release --prefix ${{matrix.deps-prefix}}
- name: Install STK
run: |
git clone https://github.com/thestk/stk ../stk
cmake -S ../stk -B ../stk/build -DCOMPILE_PROJECTS=0 ${{matrix.flags}} ${{env.STK_FLAGS}} -DCMAKE_BUILD_TYPE=Release
cmake --build ../stk/build --config Release
cmake --install ../stk/build --config Release --prefix ${{matrix.deps-prefix}}
- name: Prepare FindCoreAudio
if: ${{runner.os == 'macOS'}}
run: |
[[ ! -x ${{matrix.deps-prefix}}/share/cmake ]] && mkdir ${{matrix.deps-prefix}}/share/cmake
cp -v ../stk/cmake/FindCoreAudio.cmake $(brew --prefix cmake)/share/cmake/Modules/
- name: Checkout Repo
uses: actions/checkout@v3
- name: Prepare workdir (UNIX)
if: ${{runner.os != 'Windows'}}
run: |
export WORKDIR="${{github.workspace}}"
export AQTPATH="${{matrix.aqt-prefix}}"
export DEPSPATH="${{matrix.deps-prefix}}"
echo "WORKDIR=${WORKDIR}" >> $GITHUB_ENV
echo "AQTPATH=${AQTPATH}" >> $GITHUB_ENV
echo "DEPSPATH=${DEPSPATH}" >> $GITHUB_ENV
- name: Prepare workdir (MINGW)
if: ${{runner.os == 'Windows'}}
shell: 'msys2 {0}'
run: |
export WORKDIR="$(cygpath -m "${{github.workspace}}")"
export AQTPATH="$(cygpath -m "${{matrix.aqt-prefix}}")"
export DEPSPATH="$(cygpath -m "${{matrix.deps-prefix}}")"
echo "WORKDIR=${WORKDIR}" >> $GITHUB_ENV
echo "AQTPATH=${AQTPATH}" >> $GITHUB_ENV
echo "DEPSPATH=${DEPSPATH}" >> $GITHUB_ENV
- name: Prepare macOS temp disk
if: ${{runner.os == 'macOS'}}
run: |
export DMGNAME="${{env.pkgname}}-${{matrix.name}}"
export TEMP_DMGFILE=${{env.pkgname}}-temp.dmg
hdiutil create -size 700m -fs HFS+ -volname "${DMGNAME}" "${TEMP_DMGFILE}"
hdiutil attach "${TEMP_DMGFILE}"
TEMP_DMGPOINT="/Volumes/${DMGNAME}"
echo "TEMP_DMGNAME=\"${TEMP_DMGNAME}\"" >> $GITHUB_ENV
echo "TEMP_DMGFILE=\"${TEMP_DMGFILE}\"" >> $GITHUB_ENV
echo "TEMP_DMGPOINT=\"${TEMP_DMGPOINT}\"" >> $GITHUB_ENV
- name: Setup install prefix
shell: 'bash'
run: |
if [ ${{ runner.os }} == "Linux" ]; then
export INSTALL_PREFIX=${{env.WORKDIR}}/${{env.pkgname}}-appdir/usr
elif [ ${{ runner.os }} == "macOS" ]; then
export INSTALL_PREFIX="${{env.TEMP_DMGPOINT}}"
else
export INSTALL_PREFIX=${{env.WORKDIR}}/${{env.pkgname}}-appdir
fi
echo "INSTALL_PREFIX=$INSTALL_PREFIX" >> $GITHUB_ENV
- name: Setup project configuration flags
shell: 'bash'
run: |
PROJECT_FLAGS="-DCMAKE_BUILD_TYPE=Release"
PROJECT_FLAGS+=" -DCMAKE_INSTALL_PREFIX=\"${{env.INSTALL_PREFIX}}\""
PROJECT_FLAGS+=" -DCMAKE_PREFIX_PATH=\"${{env.AQTPATH}}/${{matrix.qt-version}}/${{matrix.aqt-subdir}};${{env.DEPSPATH}}\""
echo "PROJECT_FLAGS=${PROJECT_FLAGS}" >> $GITHUB_ENV
- name: Run Configure
run: cmake -S "${{env.WORKDIR}}" -B "${{env.WORKDIR}}/build" ${{matrix.flags}} ${{env.PROJECT_FLAGS}}
- name: Compile Code
run: cmake --build ${{env.WORKDIR}}/build --config Release
- name: Prepare appdir
shell: 'bash'
run: |
if [ ${{ runner.os }} == "Windows" ]; then export SUFFIX="${{env.pkgname}}"
elif [ ${{ runner.os }} == "macOS" ]; then export SUFFIX="${{env.pkgname}}.app"
else export SUFFIX=""
fi
export APPDIR="${{env.INSTALL_PREFIX}}/${SUFFIX}"
echo "APPDIR=${APPDIR}" >> $GITHUB_ENV
- name: Install
run: |
cmake --install ${{env.WORKDIR}}/build --config Release --prefix "${{ env.INSTALL_PREFIX }}"
- name: Create MacOS Package
if: ${{runner.os == 'macOS'}}
run: |
DESTINATION_DIR=${{env.pkgname}}-${{matrix.name}}
DIST_DMG=${{env.pkgname}}-${{matrix.name}}.dmg
mkdir ${DESTINATION_DIR} || echo "::warning:: ${DESTINATION_DIR} already exists"
${{matrix.aqt-prefix}}/${{matrix.qt-version}}/${{matrix.aqt-subdir}}/bin/macdeployqt \
"${{env.APPDIR}}"
find ${{env.DEPSPATH}} -name "*.dylib" -exec cp {} "${{env.APPDIR}}"/Contents/Frameworks \;
codesign --verbose --strict --continue --timestamp --force --deep -s donarturo11.github.io "${{env.APPDIR}}"
ln -s /Applications/ "${{ env.TEMP_DMGPOINT }}"/Applications
hdiutil detach "${{ env.TEMP_DMGPOINT }}"
hdiutil convert "${{env.TEMP_DMGFILE}}" -format UDBZ \
-o ${DESTINATION_DIR}/${DIST_DMG}
shasum -a 256 ${DESTINATION_DIR}/${DIST_DMG}
- name: Create Windows Package
if: ${{runner.os == 'Windows'}}
shell: 'msys2 {0}'
run: |
export ARTIFACT_DIR=${{env.WORKDIR}}/${{env.pkgname}}-${{matrix.name}}
cp -v ${{env.DEPSPATH}}/bin/*.dll ${{env.APPDIR}}/
${{matrix.aqt-prefix}}/${{matrix.qt-version}}/${{matrix.aqt-subdir}}/bin/windeployqt.exe ${{env.APPDIR}}/
mkdir $ARTIFACT_DIR || echo "::warning::${ARTIFACT_DIR} already exists"
cd $ARTIFACT_DIR
cpack --config ${{env.WORKDIR}}/build/CPackConfig.cmake -G NSIS -V
mv ${{env.pkgname}}*.exe ${{env.pkgname}}-${{matrix.name}}-Installer.exe
cpack --config ${{env.WORKDIR}}/build/CPackConfig.cmake -G 7Z
mv ${{env.pkgname}}*.7z ${{env.pkgname}}-${{matrix.name}}-Portable.7z
rm -Rf _CPack_Packages/
- name: Create AppImage
if: ${{runner.os == 'Linux'}}
run: |
sudo bash -c "echo ${{matrix.aqt-prefix}}/${{matrix.qt-version}}/${{matrix.aqt-subdir}}/lib > /etc/ld.so.conf.d/aqt.conf"
sudo bash -c "echo ${{matrix.deps-prefix}}/lib > /etc/ld.so.conf.d/deps.conf"
sudo rm /etc/ld.so.cache
sudo ldconfig
echo "::group:: Downloading linux deploy"
wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
echo "::endgroup::"
LINUXDEPLOY=linuxdeploy-x86_64.AppImage
chmod +x *.AppImage
APPDIR=${{env.pkgname}}.AppDir
ICONFILE=$(find ${{ env.APPDIR }} -name *.png)
DESKTOPFILE=$(find ${{env.APPDIR}} -name *.desktop)
EXECFILE=$(find ${{env.APPDIR}} -name ${{env.pkgname}} -type f -executable)
export QTDIR=${{matrix.aqt-prefix}}/${{matrix.qt-version}}/${{matrix.aqt-subdir}}
export QMAKE=${QTDIR}/bin/qmake
export QT_INSTALL_PLUGINS=${QTDIR}/plugins/
export EXTRA_QT_PLUGINS="multimediagsttools"
echo "::group:: Linux deploy QT"
./${LINUXDEPLOY} \
--appdir=${APPDIR} \
--executable=${EXECFILE} \
--icon-file=${ICONFILE} \
--desktop-file=${DESKTOPFILE} \
--plugin qt
cp -Rv $QT_INSTALL_PLUGINS/multimedia ${APPDIR}/usr/plugins/
cp -Rv $QT_INSTALL_PLUGINS/generic ${APPDIR}/usr/plugins/
echo "::endgroup::"
echo "::group:: Creating AppImage"
./${LINUXDEPLOY} --appdir=${APPDIR} --output=appimage
mv ${{env.pkgname}}*.AppImage ${{env.pkgname}}-${{matrix.name}}.AppImage
export APPIMAGEDIR=${{github.workspace}}/${{env.pkgname}}-${{matrix.name}}
mkdir $APPIMAGEDIR || echo "::warning::${APPIMAGEDIR} already exists"
cp ${{env.pkgname}}-${{matrix.name}}.AppImage ${{env.pkgname}}-${{matrix.name}}
echo "::endgroup::"
- name: Upload All Binaries
uses: actions/upload-artifact@v3
with:
name: ${{env.pkgname}}-${{matrix.name}}
path: ${{github.workspace}}/${{env.pkgname}}-${{matrix.name}}
publish:
needs: build
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest
steps:
- name: Get Build Tag
id: get_tag
run: |
DATE=$(date +'%Y%m%d-%H%M')
BUILD_TAG="${{env.pkgname}}-snapshot-${DATE}"
echo "BUILD_TAG=${BUILD_TAG}" >> $GITHUB_OUTPUT
echo DATE=$DATE >> $GITHUB_ENV
- name: Get macOS universal binary
uses: actions/download-artifact@v3
with:
name: ${{env.pkgname}}-macos-universal
path: ${{github.workspace}}/${{env.pkgname}}-macos-universal
- name: Get macOS legacy binary
uses: actions/download-artifact@v3
with:
name: ${{env.pkgname}}-macos-legacy
path: ${{github.workspace}}/${{env.pkgname}}-macos-legacy
- name: Get Linux binary
uses: actions/download-artifact@v3
with:
name: ${{env.pkgname}}-linux
path: ${{github.workspace}}/${{env.pkgname}}-linux
- name: Get Windows binary
uses: actions/download-artifact@v3
with:
name: ${{env.pkgname}}-windows-msvc
path: ${{github.workspace}}/${{env.pkgname}}-windows-msvc
- name: Get Windows mingw binary
uses: actions/download-artifact@v3
with:
name: ${{env.pkgname}}-windows-mingw
path: ${{github.workspace}}/${{env.pkgname}}-windows-mingw
- name: Get Windows mingw qt5 binary
uses: actions/download-artifact@v3
with:
name: ${{env.pkgname}}-windows-mingw-qt5
path: ${{github.workspace}}/${{env.pkgname}}-windows-mingw-qt5
- if: github.event_name == 'push' # this is a snapshot build. create a release and upload binaries
name: Create Snapshot Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.get_tag.outputs.BUILD_TAG }}
tag_name: ${{ steps.get_tag.outputs.BUILD_TAG }}
generate_release_notes: true
prerelease: true
files: |
${{github.workspace}}/${{env.pkgname}}-macos-universal/*
${{github.workspace}}/${{env.pkgname}}-macos-legacy/*
${{github.workspace}}/${{env.pkgname}}-linux/*
${{github.workspace}}/${{env.pkgname}}-windows-msvc/*
${{github.workspace}}/${{env.pkgname}}-windows-mingw/*
${{github.workspace}}/${{env.pkgname}}-windows-mingw-qt5/*
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') # this is a versioned build. check if release already exists
name: Find Existing Release
id: find_release
uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
doNotFailIfNotFound: true
tag: ${{ github.ref_name }}
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') && steps.find_release.outputs.id != 0 # release exists - upload macOS binary
name: Update Tagged Release (macOS universal)
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.find_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/${{env.pkgname}}-macos-universal
asset_name: ${{env.pkgname}}-macos-universal
asset_content_type: application/octet-stream
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') && steps.find_release.outputs.id != 0 # release exists - upload macOS binary
name: Update Tagged Release (macOS legacy)
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.find_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/${{env.pkgname}}-macos-legacy
asset_name: ${{env.pkgname}}-macos-legacy
asset_content_type: application/octet-stream
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') && steps.find_release.outputs.id != 0 # release exists - upload Linux binary
name: Update Tagged Release (Linux)
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.find_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/${{env.pkgname}}-linux
asset_name: ${{env.pkgname}}-linux-x86_64
asset_content_type: application/octet-stream
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') && steps.find_release.outputs.id != 0 # release exists - upload Windows binary
name: Update Tagged Release (Windows)
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.find_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/${{env.pkgname}}-windows
asset_name: ${{env.pkgname}}-msvc-x86_64
asset_content_type: application/octet-stream
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') && steps.find_release.outputs.id != 0 # release exists - upload Windows binary
name: Update Tagged Release (Windows mingw qt5)
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.find_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/${{env.pkgname}}-windows-mingw-qt5
asset_name: ${{env.pkgname}}-mingw-qt5-x86_64
asset_content_type: application/octet-stream
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') && steps.find_release.outputs.id != 0 # release exists - upload Windows binary
name: Update Tagged Release (Windows mingw)
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.find_release.outputs.upload_url }}
asset_path: ${{github.workspace}}/${{env.pkgname}}-windows-mingw
asset_name: ${{env.pkgname}}-mingw-x86_64
asset_content_type: application/octet-stream
- if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') && steps.find_release.outputs.id == 0 # otherwise release does not exist, create one and upload binaries
name: Create Tagged Release
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true
prerelease: false
files: |
${{github.workspace}}/${{env.pkgname}}-macos-universal*
${{github.workspace}}/${{env.pkgname}}-macos-legacy*
${{github.workspace}}/${{env.pkgname}}-windows-msvc*
${{github.workspace}}/${{env.pkgname}}-windows-mingw*
${{github.workspace}}/${{env.pkgname}}-linux*