forked from VOICEVOX/voicevox
-
Notifications
You must be signed in to change notification settings - Fork 0
511 lines (451 loc) · 22.6 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
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
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
name: Build
on:
push:
branches:
- main
release:
types:
- created
workflow_dispatch:
inputs:
version:
description: "バージョン情報(A.BB.C / A.BB.C-preview.D)"
required: true
prerelease:
description: "プレリリースかどうか"
type: boolean
default: true
code_signing:
description: "コード署名する"
type: boolean
default: false
upload_artifact:
description: "デバッグ用に成果物をartifactにアップロードするか"
type: boolean
default: false
env:
VOICEVOX_ENGINE_REPO_URL: "https://github.com/VOICEVOX/voicevox_engine"
VOICEVOX_ENGINE_VERSION: 0.20.0
VOICEVOX_RESOURCE_VERSION: 0.20.0
VOICEVOX_EDITOR_VERSION:
|- # releaseタグ名か、workflow_dispatchでのバージョン名か、999.999.999-developが入る
${{ github.event.release.tag_name || github.event.inputs.version || '999.999.999-develop' }}
defaults:
run:
shell: bash
jobs:
build-and-upload:
environment: ${{ github.event.inputs.code_signing == 'true' && 'code_signing' || '' }} # コード署名用のenvironment(false時の挙動は2022年7月10日時点で未定義動作)
env:
ELECTRON_CACHE: .cache/electron
ELECTRON_BUILDER_CACHE: .cache/electron-builder
cache-version: v2
# GNUコマンド
sed: ${{ startsWith(matrix.os, 'macos-') && 'gsed' || 'sed' }}
strategy:
fail-fast: false
matrix:
artifact_name:
- linux-nvidia-prepackage
- linux-cpu-prepackage
- windows-nvidia-prepackage
- windows-cpu-prepackage
- windows-directml-prepackage
- macos-x64-cpu-prepackage
- macos-arm64-cpu-prepackage
include:
# Linux NVIDIA GPU
- artifact_name: linux-nvidia-prepackage
artifact_path: dist_electron/linux-unpacked
voicevox_engine_asset_name: linux-nvidia
package_name: voicevox
compressed_artifact_name: voicevox-linux-nvidia
app_asar_dir: prepackage/resources
installer_artifact_name: linux-nvidia-appimage
linux_artifact_name: "VOICEVOX.${ext}"
linux_executable_name: voicevox
linux_appimage_7z_name: VOICEVOX.AppImage
os: ubuntu-20.04
# Linux CPU
- artifact_name: linux-cpu-prepackage
artifact_path: dist_electron/linux-unpacked
voicevox_engine_asset_name: linux-cpu
package_name: voicevox-cpu
compressed_artifact_name: voicevox-linux-cpu
app_asar_dir: prepackage/resources
installer_artifact_name: linux-cpu-appimage
linux_artifact_name: "VOICEVOX.${ext}"
linux_executable_name: voicevox
linux_appimage_7z_name: VOICEVOX-CPU.AppImage
os: ubuntu-20.04
# Windows CUDA
- artifact_name: windows-nvidia-prepackage
artifact_path: dist_electron/win-unpacked
voicevox_engine_asset_name: windows-nvidia
package_name: voicevox-cuda
compressed_artifact_name: voicevox-windows-nvidia
app_asar_dir: prepackage/resources
installer_artifact_name: windows-nvidia-nsis-web
nsis_web_artifact_name: "VOICEVOX-CUDA.Web.Setup.${version}.${ext}"
os: windows-2019
# Windows CPU
- artifact_name: windows-cpu-prepackage
artifact_path: dist_electron/win-unpacked
voicevox_engine_asset_name: windows-cpu
package_name: voicevox-cpu
compressed_artifact_name: voicevox-windows-cpu
app_asar_dir: prepackage/resources
installer_artifact_name: windows-cpu-nsis-web
nsis_web_artifact_name: "VOICEVOX-CPU.Web.Setup.${version}.${ext}"
os: windows-2019
# Windows DirectML
- artifact_name: windows-directml-prepackage
artifact_path: dist_electron/win-unpacked
voicevox_engine_asset_name: windows-directml
package_name: voicevox
compressed_artifact_name: voicevox-windows-directml
app_asar_dir: prepackage/resources
installer_artifact_name: windows-directml-nsis-web
nsis_web_artifact_name: "VOICEVOX.Web.Setup.${version}.${ext}"
os: windows-2019
# macOS CPU (x64)
- artifact_name: macos-x64-cpu-prepackage
artifact_path: dist_electron/mac
voicevox_engine_asset_name: macos-x64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-macos-x64-cpu
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-x64-cpu-dmg
macos_artifact_name: "VOICEVOX.${version}-x64.${ext}"
os: macos-12
# macOS CPU (arm64)
- artifact_name: macos-arm64-cpu-prepackage
artifact_path: dist_electron/mac-arm64
voicevox_engine_asset_name: macos-arm64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-macos-arm64-cpu
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-arm64-cpu-dmg
macos_artifact_name: "VOICEVOX.${version}-arm64.${ext}"
os: macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# NOTE: The default sed of macOS is BSD sed.
# There is a difference in specification between BSD sed and GNU sed,
# so you need to install GNU sed.
- name: Install GNU sed on macOS
if: startsWith(matrix.os, 'macos-')
run: |
brew install gnu-sed
# Rename executable file
# NOTE: If the CPU/DirectML/GPU builds have the same package name,
# the NSIS installers and the 7z files have duplicate names.
# For Linux, If they have the same product name,
# the AppImages have duplicate names.
# Files with the same name cannot be uploaded to a single GitHub Release,
# so different package/product names should be used for CPU/DirectML/GPU builds.
- name: Replace package name & version
run: |
$sed -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json
# $sed -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js
$sed -i 's/"version": "999.999.999"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"
- name: Cache Electron
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_CACHE }}
key: ${{ env.cache-version }}-${{ runner.os }}--electron-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ env.cache-version }}-${{ runner.os }}--electron-cache-
- name: Cache Electron-Builder
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_BUILDER_CACHE }}
key: ${{ env.cache-version }}-${{ runner.os }}--electron-builder-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ env.cache-version }}-${{ runner.os }}--electron-builder-cache-
- name: Install dependencies
run: npm ci
- name: Checkout Product Version Resource
uses: actions/checkout@v4
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: resource
- name: Create and replace software resources
run: |
rm build/README.txt
rm public/policy.md
{
cat resource/editor/README.md
echo
cat resource/editor/ACKNOWLEDGMENTS.md
} \
> build/README.txt
cp build/README.txt public/policy.md
cp resource/editor/PRIVACYPOLICY.md public/privacyPolicy.md
- name: Overwrite .env.production for Linux
if: startsWith(matrix.os, 'ubuntu-')
run: |
$sed -i 's|run.exe|./run|g' .env.production
- name: Overwrite .env.production for macOS
if: startsWith(matrix.os, 'macos-')
run: |
$sed -i 's|vv-engine/run.exe|../Resources/vv-engine/run|g' .env.production
- name: Replace .env.production infomations
run: |
# GTM ID
gtm_id=$(jq -er '.gtm_container_id' resource/editor/metas.json)
$sed -i 's/VITE_GTM_CONTAINER_ID=.*/VITE_GTM_CONTAINER_ID='"$gtm_id"'/' .env.production
- name: Generate public/licenses.json
run: npm run license:generate -- -o public/licenses.json
- name: Define Code Signing Envs
if: startsWith(matrix.os, 'windows-') && github.event.inputs.code_signing == 'true'
run: |
bash build/codesign_setup.bash
THUMBPRINT="$(head -n 1 $THUMBPRINT_PATH)"
SIGNTOOL_PATH="$(head -n 1 $SIGNTOOL_PATH_PATH)"
echo "::add-mask::$THUMBPRINT"
echo "WIN_CERTIFICATE_SHA1=$THUMBPRINT" >> $GITHUB_ENV
echo 'WIN_SIGNING_HASH_ALGORITHMS=["sha256"]' >> $GITHUB_ENV
echo "SIGNTOOL_PATH=$SIGNTOOL_PATH" >> $GITHUB_ENV
env:
ESIGNERCKA_USERNAME: ${{ secrets.ESIGNERCKA_USERNAME }}
ESIGNERCKA_PASSWORD: ${{ secrets.ESIGNERCKA_PASSWORD }}
ESIGNERCKA_TOTP_SECRET: ${{ secrets.ESIGNERCKA_TOTP_SECRET }}
THUMBPRINT_PATH: /tmp/esignercka_thumbprint.txt
SIGNTOOL_PATH_PATH: /tmp/signtool_path.txt
# Build result will be exported to ${{ matrix.artifact_path }}
- name: Build Electron
env:
NSIS_WEB_ARTIFACT_NAME: ${{ matrix.nsis_web_artifact_name }}
LINUX_ARTIFACT_NAME: ${{ matrix.linux_artifact_name }}
LINUX_EXECUTABLE_NAME: ${{ matrix.linux_executable_name }}
MACOS_ARTIFACT_NAME: ${{ matrix.macos_artifact_name }}
# https://github.com/electron-userland/electron-builder/issues/3179
USE_HARD_LINKS: false
run: npm run electron:build -- --dir
- name: Reset Code Signing Envs
if: startsWith(matrix.os, 'windows-') && github.event.inputs.code_signing == 'true'
run: |
bash build/codesign_cleanup.bash
echo 'WIN_CERTIFICATE_SHA1=' >> $GITHUB_ENV
echo 'WIN_SIGNING_HASH_ALGORITHMS=' >> $GITHUB_ENV
echo 'SIGNTOOL_PATH=' >> $GITHUB_ENV
env:
THUMBPRINT_PATH: /tmp/esignercka_thumbprint.txt
- name: Rename NoEngine Prepackage
run: |
mv ${{ matrix.artifact_path }} ./prepackage
# Download VOICEVOX ENGINE
- name: Download VOICEVOX ENGINE
id: download-engine
uses: ./.github/actions/download-engine
with:
version: ${{ env.VOICEVOX_ENGINE_VERSION }}
dest: ${{ github.workspace }}/voicevox_engine
target: ${{ matrix.voicevox_engine_asset_name }}
# FIXME: asarをextract/packせず、ビルド前にengine_licenses.jsonとlicenses.jsonを結合する
- name: Merge licenses.json (ENGINE, VOICEVOX)
run: |
# Unpack asar
npx asar extract "${{ matrix.app_asar_dir }}/app.asar" "${{ matrix.app_asar_dir }}/app"
rm "${{ matrix.app_asar_dir }}/app.asar"
mv voicevox_engine/licenses.json engine_licenses.json
npm run license:merge -- -o "${{ matrix.app_asar_dir }}/app/dist/licenses.json" -i engine_licenses.json -i "${{ matrix.app_asar_dir }}/app/dist/licenses.json"
# Repack asar
npx asar pack "${{ matrix.app_asar_dir }}/app" "${{ matrix.app_asar_dir }}/app.asar"
rm -rf "${{ matrix.app_asar_dir }}/app"
- name: Merge VOICEVOX ENGINE into prepackage/
if: startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'linux-')
run: |
mv voicevox_engine/ prepackage/vv-engine/
- name: Merge VOICEVOX ENGINE into prepackage/VOICEVOX.app/Contents/Resources/
if: startsWith(matrix.artifact_name, 'macos-')
run: |
mv voicevox_engine/ prepackage/VOICEVOX.app/Contents/Resources/vv-engine/
- name: Recover file permissions
if: startsWith(matrix.artifact_name, 'linux-') # linux
run: |
chmod +x "prepackage/${{ matrix.linux_executable_name }}"
chmod +x "prepackage/vv-engine/run"
- name: Recover file permissions for macOS build
if: startsWith(matrix.artifact_name, 'macos-') # macOS
run: |
chmod +x "prepackage/VOICEVOX.app/Contents/Resources/vv-engine/run"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (GPU).app/Contents/MacOS/VOICEVOX Helper (GPU)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (Plugin).app/Contents/MacOS/VOICEVOX Helper (Plugin)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (Renderer).app/Contents/MacOS/VOICEVOX Helper (Renderer)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper.app/Contents/MacOS/VOICEVOX Helper"
# NOTE: actions/upload-artifact@v4 does not upload `**.lproj` directories, which are an empty directory.
# Make `ja.lproj` directory because it is necessary for Japanese localization on macOS.
- name: Make .lproj directories in Resources directory of VOICEVOX.app
if: startsWith(matrix.artifact_name, 'macos-')
run: mkdir -p prepackage/VOICEVOX.app/Contents/Resources/ja.lproj prepackage/VOICEVOX.app/Contents/Resources/en.lproj
- name: Ad hoc code signing
if: endsWith(matrix.installer_artifact_name, '-dmg') # macOS
run: codesign --force --deep -s - prepackage/VOICEVOX.app
- name: Create Linux tar.gz (without nvidia)
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia')
run: |
name="${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}"
7z a -ttar $name.tar prepackage/
7z rn $name.tar prepackage/ VOICEVOX/
7z a -tgzip $name.tar.gz $name.tar
rm $name.tar
- name: Upload Linux tar.gz (without nvidia) to Artifacts
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-targz
path: |-
${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.tar.gz
- name: Upload Linux tar.gz (without nvidia) to Release Assets
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
files: |-
${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.tar.gz
target_commitish: ${{ github.sha }}
- name: Delete Linux tar.gz (without nvidia)
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia')
run: |
rm ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.tar.gz
- name: Create Windows & Mac zip (without nvidia)
if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia')
run: |
name="${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}"
7z a -tzip $name.zip prepackage/
7z rn $name.zip prepackage/ VOICEVOX/
- name: Upload Windows & Mac zip (without nvidia) to Artifacts
if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-zip
path: |-
${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip
- name: Upload Windows & Mac zip (without nvidia) to Release Assets
if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
files: |-
${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip
target_commitish: ${{ github.sha }}
- name: Delete Windows & Mac zip (without nvidia)
if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia')
run: |
rm ${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip
- name: Define Code Signing Envs
if: startsWith(matrix.os, 'windows-') && github.event.inputs.code_signing == 'true'
run: |
bash build/codesign_setup.bash
THUMBPRINT="$(head -n 1 $THUMBPRINT_PATH)"
SIGNTOOL_PATH="$(head -n 1 $SIGNTOOL_PATH_PATH)"
echo "::add-mask::$THUMBPRINT"
echo "WIN_CERTIFICATE_SHA1=$THUMBPRINT" >> $GITHUB_ENV
echo 'WIN_SIGNING_HASH_ALGORITHMS=["sha256"]' >> $GITHUB_ENV
echo "SIGNTOOL_PATH=$SIGNTOOL_PATH" >> $GITHUB_ENV
env:
ESIGNERCKA_USERNAME: ${{ secrets.ESIGNERCKA_USERNAME }}
ESIGNERCKA_PASSWORD: ${{ secrets.ESIGNERCKA_PASSWORD }}
ESIGNERCKA_TOTP_SECRET: ${{ secrets.ESIGNERCKA_TOTP_SECRET }}
THUMBPRINT_PATH: /tmp/esignercka_thumbprint.txt
SIGNTOOL_PATH_PATH: /tmp/signtool_path.txt
# NOTE: prepackage can be removed before splitting nsis-web archive
- name: Build Electron
if: endsWith(matrix.installer_artifact_name, '-nsis-web') || endsWith(matrix.installer_artifact_name, '-appimage') # windows and linux
env:
NSIS_WEB_ARTIFACT_NAME: ${{ matrix.nsis_web_artifact_name }}
LINUX_ARTIFACT_NAME: ${{ matrix.linux_artifact_name }}
LINUX_EXECUTABLE_NAME: ${{ matrix.linux_executable_name }}
run: |
npm run electron:build -- --prepackaged prepackage/
- name: Build Electron (for macOS)
if: endsWith(matrix.installer_artifact_name, '-dmg') # macOS
env:
MACOS_ARTIFACT_NAME: ${{ matrix.macos_artifact_name }}
run: |
npm run electron:build -- --prepackaged prepackage/VOICEVOX.app
- name: Reset Code Signing Envs
if: startsWith(matrix.os, 'windows-') && github.event.inputs.code_signing == 'true'
run: |
bash build/codesign_cleanup.bash
echo 'WIN_CERTIFICATE_SHA1=' >> $GITHUB_ENV
echo 'WIN_SIGNING_HASH_ALGORITHMS=' >> $GITHUB_ENV
echo 'SIGNTOOL_PATH=' >> $GITHUB_ENV
env:
THUMBPRINT_PATH: /tmp/esignercka_thumbprint.txt
- name: Create Linux AppImage split
if: endsWith(matrix.installer_artifact_name, '-appimage')
run: |
cd dist_electron/
for appImageFile in *.AppImage; do
echo "Splitting ${appImageFile}"
# compressed to MyArtifact.AppImage.7z.001, MyArtifact.AppImage.7z.002, ...
7z -v1g a "${{ matrix.linux_appimage_7z_name }}.7z" "${appImageFile}"
# Output split archive name<TAB>size<TAB>hash list to myartifact.7z.txt
ls "${{ matrix.linux_appimage_7z_name }}.7z".* > archives_name.txt
stat --printf="%s\n" "${{ matrix.linux_appimage_7z_name }}.7z".* > archives_size.txt
md5sum "${{ matrix.linux_appimage_7z_name }}.7z".* | awk '{print $1}' | tr a-z A-Z > archives_hash.txt
paste -d '\t' archives_name.txt archives_size.txt archives_hash.txt > archives.txt
mv archives.txt "${{ matrix.installer_artifact_name }}.7z.txt"
done
- name: Upload Linux AppImage split to Artifacts
if: endsWith(matrix.installer_artifact_name, '-appimage') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/*.7z.*
- name: Upload Linux AppImage split to Release Assets
if: endsWith(matrix.installer_artifact_name, '-appimage') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
files: |-
dist_electron/*.7z.*
target_commitish: ${{ github.sha }}
- name: Upload macOS dmg to Artifacts
if: endsWith(matrix.installer_artifact_name, '-dmg') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/*.dmg
- name: Upload macOS dmg to Release Assets
if: endsWith(matrix.installer_artifact_name, '-dmg') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
files: |-
dist_electron/*.dmg
target_commitish: ${{ github.sha }}
- name: Upload Windows NSIS Web to Artifacts
if: endsWith(matrix.installer_artifact_name, '-nsis-web') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/nsis-web/out/*.7z.*
dist_electron/nsis-web/*.exe
- name: Upload Windows NSIS Web to Release Assets
if: endsWith(matrix.installer_artifact_name, '-nsis-web') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
files: |-
dist_electron/nsis-web/out/*.7z.*
dist_electron/nsis-web/*.exe
target_commitish: ${{ github.sha }}