-
-
Notifications
You must be signed in to change notification settings - Fork 39
545 lines (457 loc) · 22.5 KB
/
create-release.yml
File metadata and controls
545 lines (457 loc) · 22.5 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
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
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
name: Create Release/Upload Asset
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CACHE_VERSION: v8
LLVM_VERSION: 19
LLVM_ZIPFILE: "https://www.dropbox.com/scl/fi/xdcj15hlzpod06x4wpls1/llvm_19_1_3_release.zip?rlkey=x38yiyfw3y6bv15z5j3oi84lb&st=bz3u5xkv&dl=1"
LLVM_TARGZFILE: "https://www.dropbox.com/scl/fi/l9xrfupdbwqbnckr5g36p/llvm_19_1_3_release.tgz?rlkey=xubw01vl6ey3xszbph32xqfip&st=okz2ghqx&dl=1"
LLVM_UB20_TARGZFILE: "https://www.dropbox.com/scl/fi/jfs77u2moymjo57ca4r0s/llvm_19_1_3_release_UB20.tgz?rlkey=tia0bdfa07gaeidepumb1e1fy&st=np5mcrox&dl=1"
jobs:
build_on_windows:
name: Create/Upload Release Asset (Windows)
runs-on: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build project # This would actually build your project, using zip for an example artifact
run: echo 'SELECTED_COLOR=green Build project (Windows)' >> "$GITHUB_OUTPUT"
- name: Cache Build 3rd Party
id: cache-3rd-party
uses: actions/cache@v4
with:
path: __build/llvm
key: ${{ runner.os }}-build-llvm-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries
id: cache-3rd-party-binary
uses: actions/cache@v4
with:
path: 3rdParty
key: ${{ runner.os }}-3rd-party-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries - LLVM ${{ env.LLVM_VERSION }} Release
id: cache-3rd-party-binary-llvm-release
uses: actions/cache@v4
with:
path: llvm_${{ env.LLVM_VERSION }}_release.zip
key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-${{ env.CACHE_VERSION }}
- name: Retrieve version
run: echo "TAG_NAME=$(git describe --abbrev=0 --tags)" >> "$GITHUB_OUTPUT"
id: version
#shell: pwsh
shell: bash
- name: Delete __Build TS folders
continue-on-error: true
run: if (Test-Path -Path ".\__build\tsc\msbuild\x64\release") { Remove-Item -Recurse -Force ".\__build\tsc\msbuild\x64\release" }
shell: pwsh
- name: Create __Build Folders
run: if (!(Test-Path -Path ".\__build\tsc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\tsc\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\llvm\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\llvm\msbuild\x64\release" }; if (!(Test-Path -Path ".\__build\gc\msbuild\x64\release")) { New-Item -ItemType Directory -Force -Path ".\__build\gc\msbuild\x64\release" };
shell: pwsh
- name: Download 3rd party - LLVM
continue-on-error: true
shell: pwsh
run: if (!(Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip")) { Invoke-WebRequest -SkipCertificateCheck -Uri "${{ env.LLVM_ZIPFILE }}" -OutFile "llvm_${{ env.LLVM_VERSION }}_release.zip" }
- name: UnZip 3rd party - LLVM
continue-on-error: false
run: if (Test-Path -Path "llvm_${{ env.LLVM_VERSION }}_release.zip") { Expand-Archive -Path "llvm_${{ env.LLVM_VERSION }}_release.zip" -DestinationPath "3rdParty\llvm\x64" -Force }
shell: pwsh
- name: Download 3rd party source - GC
continue-on-error: true
shell: pwsh
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz" -OutFile "gc-8.0.4.tar.gz"
- name: Download 3rd party source - GC:Atomic_ops
continue-on-error: true
shell: pwsh
run: Invoke-WebRequest -SkipCertificateCheck -Uri "https://www.hboehm.info/gc/gc_source/libatomic_ops-7.6.10.tar.gz" -OutFile "libatomic_ops-7.6.10.tar.gz"
- name: UnZip 3rd party source - GC
continue-on-error: false
run: tar -xvzf gc-8.0.4.tar.gz -C ./3rdParty/
shell: pwsh
- name: UnZip 3rd party source - GC:Atomic_ops
continue-on-error: false
run: tar -xvzf libatomic_ops-7.6.10.tar.gz -C ./3rdParty/
shell: pwsh
- name: Create gc-8.0.4\libatomic_ops Folders
run: if (!(Test-Path -Path ".\3rdParty\gc-8.0.4\libatomic_ops")) { New-Item -ItemType Directory -Force -Path ".\3rdParty\gc-8.0.4\libatomic_ops" };
shell: pwsh
- name: Copy Atomic_ops to GC
continue-on-error: false
run: xcopy /E /H /C /I /Y ".\3rdParty\libatomic_ops-7.6.10" ".\3rdParty\gc-8.0.4\libatomic_ops"
shell: pwsh
- name: Copy fixes to GC
continue-on-error: false
run: xcopy /E /H /C /I /Y ".\docs\fix\gc" ".\3rdParty\gc-8.0.4"
shell: pwsh
- name: Configure GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
run: cmake ../../../../../3rdParty/gc-8.0.4 -G "Visual Studio 17 2022" -A x64 -Wno-dev -Denable_threads=ON -Denable_cplusplus=OFF
shell: pwsh
- name: Build GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
shell: pwsh
- name: Copy GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/msbuild/x64/release
run: xcopy /E /H /C /I /Y .\${{ env.BUILD_TYPE }}\ ..\..\..\..\..\3rdParty\gc\x64\release\
shell: pwsh
- name: Configure
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/msbuild/x64/release
run: cmake ../../../../../tsc -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DTSC_PACKAGE_VERSION:STRING="${{ steps.version.outputs.TAG_NAME }}" -Wno-dev
shell: pwsh
- name: Build
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/msbuild/x64/release
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
shell: pwsh
- name: Test
working-directory: ${{github.workspace}}/__build/tsc/msbuild/x64/release
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -j1 -C ${{ env.BUILD_TYPE }} -T test --output-on-failure -T test --output-on-failure
shell: pwsh
- name: Create Zip of Windows Asset
working-directory: ${{github.workspace}}/__build
run: Get-ChildItem -Path .\tsc\msbuild\x64\release\bin\tsc.exe, .\tsc\msbuild\x64\release\bin\TypeScriptRuntime.dll, .\gc\msbuild\x64\release\${{ env.BUILD_TYPE }}\gcmt-lib.lib, .\tsc\msbuild\x64\release\lib\TypeScriptAsyncRuntime.lib, ..\3rdParty\llvm\x64\release\lib\LLVMSupport.lib, ..\3rdParty\llvm\x64\release\bin\wasm-ld.exe | Compress-Archive -DestinationPath ..\tsc.zip
shell: pwsh
- name: Archive Zip of Windows Asset
uses: actions/upload-artifact@v4
with:
name: tsc-windows-asset
path: tsc.zip
retention-days: 1
build_on_linux:
name: Create/Upload Release Asset (Ubuntu 22.04)
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Cache Build 3rd Party
id: cache-3rd-party
uses: actions/cache@v4
with:
path: __build/llvm/ninja
key: ${{ runner.os }}-build-llvm-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries
id: cache-3rd-party-binary
uses: actions/cache@v4
with:
path: 3rdParty
key: ${{ runner.os }}-3rd-party-${{ env.LLVM_VERSION }}-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries - LLVM ${{ env.LLVM_VERSION }} Release
id: cache-3rd-party-binary-llvm-release
uses: actions/cache@v4
with:
path: llvm_${{ env.LLVM_VERSION }}_release.tgz
key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-${{ env.CACHE_VERSION }}
- name: Retrieve version
run: echo "TAG_NAME=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT
id: version
- name: Delete __Build TS folders
continue-on-error: true
run: rm -R ./__build/tsc/ninja/release
shell: sh
- name: Create __Build Folders
run: mkdir -p ./__build/tsc/ninja/release; mkdir -p ./__build/gc/ninja/release
shell: sh
- name: Download 3rd party - LLVM
continue-on-error: true
shell: sh
run: |
if test ! -f "llvm_${{ env.LLVM_VERSION }}_release.tgz"; then
curl --insecure -L "${{ env.LLVM_TARGZFILE }}" --output llvm_${{ env.LLVM_VERSION }}_release.tgz
fi
- name: UnZip 3rd party - LLVM
continue-on-error: false
shell: sh
run: |
if test -f "llvm_${{ env.LLVM_VERSION }}_release.tgz"; then
file llvm_${{ env.LLVM_VERSION }}_release.tgz; mkdir -p ./3rdParty/llvm; tar -xf llvm_${{ env.LLVM_VERSION }}_release.tgz -C ./3rdParty/llvm/
fi
- name: Download 3rd party source - GC
continue-on-error: true
shell: sh
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz --output gc-8.0.4.tar.gz
- name: Download 3rd party source - GC:Atomic_ops
continue-on-error: true
shell: sh
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/libatomic_ops-7.6.10.tar.gz --output libatomic_ops-7.6.10.tar.gz
- name: UnZip 3rd party source - GC
continue-on-error: false
shell: sh
run: tar -xvzf gc-8.0.4.tar.gz -C ./3rdParty/
- name: UnZip 3rd party source - GC:Atomic_ops
continue-on-error: false
shell: sh
run: tar -xvzf libatomic_ops-7.6.10.tar.gz -C ./3rdParty/
- name: Copy Atomic_ops to GC
continue-on-error: false
shell: sh
run: cp -a ./3rdParty/libatomic_ops-7.6.10/ ./3rdParty/gc-8.0.4/libatomic_ops/
- name: Copy fixes to GC
continue-on-error: false
shell: sh
run: cp -ar ./docs/fix/gc/* ./3rdParty/gc-8.0.4/
- name: Install Ninja
continue-on-error: false
shell: sh
run: sudo apt install ninja-build
# - name: Install Clang 12
# continue-on-error: false
# shell: sh
# run: sudo apt install clang-12
- name: Configure GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: cmake ../../../../3rdParty/gc-8.0.4 -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=../../../../3rdParty/gc/release -Denable_threads=ON -Denable_cplusplus=OFF
- name: Build GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
- name: Copy GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: mkdir -p ../../../../3rdParty/gc/release/; cp ./lib* ../../../../3rdParty/gc/release/
- name: Configure
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
run: cmake ../../../../tsc -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DTSC_PACKAGE_VERSION:STRING="${{ steps.version.outputs.TAG_NAME }}" -Wno-dev
- name: Build
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 4
- name: Test
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -j1 -C ${{ env.BUILD_TYPE }} -T test --output-on-failure -T test --output-on-failure
env:
LLVM_SYMBOLIZER_PATH: ${{github.workspace}}/3rdParty/llvm/release/bin
- name: Create Tar.GZ of Linux Asset
working-directory: ${{github.workspace}}/__build
shell: sh
run: tar -czvhf ../tsc.tar.gz ./tsc/ninja/release/bin/tsc ./tsc/ninja/release/lib/libTypeScriptRuntime.so ./gc/ninja/release/libgcmt-lib.a ./tsc/ninja/release/lib/libTypeScriptAsyncRuntime.a ../3rdParty/llvm/release/bin/wasm-ld ../3rdParty/llvm/release/lib/libLLVMSupport.a ../3rdParty/llvm/release/lib/libLLVMDemangle.a
- name: Archive Tar.GZ of Linux Asset
uses: actions/upload-artifact@v4
with:
name: tsc-linux-asset
path: tsc.tar.gz
retention-days: 1
build_on_linux_ub20:
name: Create/Upload Release Asset (Ubuntu 20.04)
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Cache Build 3rd Party
id: cache-3rd-party
uses: actions/cache@v4
with:
path: __build/llvm/ninja
key: ${{ runner.os }}-build-llvm-${{ env.LLVM_VERSION }}-ub20-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries
id: cache-3rd-party-binary
uses: actions/cache@v4
with:
path: 3rdParty
key: ${{ runner.os }}-3rd-party-${{ env.LLVM_VERSION }}-ub20-${{ env.CACHE_VERSION }}
- name: Cache 3rd Party binaries - LLVM ${{ env.LLVM_VERSION }} Release
id: cache-3rd-party-binary-llvm-release
uses: actions/cache@v4
with:
path: llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz
key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-ub20-${{ env.CACHE_VERSION }}
- name: Retrieve version
run: echo "TAG_NAME=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT
id: version
- name: Delete __Build TS folders
continue-on-error: true
run: rm -R ./__build/tsc/ninja/release
shell: sh
- name: Create __Build Folders
run: mkdir -p ./__build/tsc/ninja/release; mkdir -p ./__build/gc/ninja/release
shell: sh
- name: Download 3rd party - LLVM
continue-on-error: true
shell: sh
run: |
if test ! -f "llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz"; then
curl --insecure -L "${{ env.LLVM_UB20_TARGZFILE }}" --output llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz
fi
- name: UnZip 3rd party - LLVM
continue-on-error: false
shell: sh
run: |
if test -f "llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz"; then
file llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz; mkdir -p ./3rdParty/llvm; tar -xf llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz -C ./3rdParty/llvm/
fi
- name: Download 3rd party source - GC
continue-on-error: true
shell: sh
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/gc-8.0.4.tar.gz --output gc-8.0.4.tar.gz
- name: Download 3rd party source - GC:Atomic_ops
continue-on-error: true
shell: sh
run: curl --insecure -L https://www.hboehm.info/gc/gc_source/libatomic_ops-7.6.10.tar.gz --output libatomic_ops-7.6.10.tar.gz
- name: UnZip 3rd party source - GC
continue-on-error: false
shell: sh
run: tar -xvzf gc-8.0.4.tar.gz -C ./3rdParty/
- name: UnZip 3rd party source - GC:Atomic_ops
continue-on-error: false
shell: sh
run: tar -xvzf libatomic_ops-7.6.10.tar.gz -C ./3rdParty/
- name: Copy Atomic_ops to GC
continue-on-error: false
shell: sh
run: cp -a ./3rdParty/libatomic_ops-7.6.10/ ./3rdParty/gc-8.0.4/libatomic_ops/
- name: Copy fixes to GC
continue-on-error: false
shell: sh
run: cp -ar ./docs/fix/gc/* ./3rdParty/gc-8.0.4/
- name: Install Ninja
continue-on-error: false
shell: sh
run: sudo apt install ninja-build
# - name: Install Clang 12
# continue-on-error: false
# shell: sh
# run: sudo apt install clang-12
- name: Configure GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: cmake ../../../../3rdParty/gc-8.0.4 -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=../../../../3rdParty/gc/release -Denable_threads=ON -Denable_cplusplus=OFF
- name: Build GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8
- name: Copy GC
continue-on-error: false
working-directory: ${{github.workspace}}/__build/gc/ninja/release
shell: sh
run: mkdir -p ../../../../3rdParty/gc/release/; cp ./lib* ../../../../3rdParty/gc/release/
- name: Configure
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
run: cmake ../../../../tsc -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DTSC_PACKAGE_VERSION:STRING="${{ steps.version.outputs.TAG_NAME }}" -Wno-dev
- name: Build
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 4
- name: Test
continue-on-error: false
working-directory: ${{github.workspace}}/__build/tsc/ninja/release
shell: sh
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -j1 -C ${{ env.BUILD_TYPE }} -T test --output-on-failure -T test --output-on-failure
env:
LLVM_SYMBOLIZER_PATH: ${{github.workspace}}/3rdParty/llvm/release/bin
- name: Create Tar.GZ of Linux Asset
working-directory: ${{github.workspace}}/__build
shell: sh
run: tar -czvhf ../tsc-ub20.tar.gz ./tsc/ninja/release/bin/tsc ./tsc/ninja/release/lib/libTypeScriptRuntime.so ./gc/ninja/release/libgcmt-lib.a ./tsc/ninja/release/lib/libTypeScriptAsyncRuntime.a ../3rdParty/llvm/release/bin/wasm-ld ../3rdParty/llvm/release/lib/libLLVMSupport.a ../3rdParty/llvm/release/lib/libLLVMDemangle.a
- name: Archive Tar.GZ of Linux Asset
uses: actions/upload-artifact@v4
with:
name: tsc-linux-asset-ub20
path: tsc-ub20.tar.gz
retention-days: 1
create_release:
needs: [build_on_windows, build_on_linux, build_on_linux_ub20]
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: true
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
deploy_windows_asset:
needs: create_release
name: Upload Release (Windows)
runs-on: windows-latest
steps:
- name: Download Release Asset from Store
uses: actions/download-artifact@v4
with:
name: tsc-windows-asset
- name: Upload Release Asset (Windows)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./tsc.zip
asset_name: tsc.zip
asset_content_type: application/zip
deploy_linux_asset:
needs: create_release
name: Upload Release (Ubuntu 22.04)
runs-on: ubuntu-latest
steps:
- name: Download Release Asset from Store
uses: actions/download-artifact@v4
with:
name: tsc-linux-asset
- name: Upload Release Asset (Ubuntu 22.04)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./tsc.tar.gz
asset_name: tsc.tar.gz
asset_content_type: application/tar+gzip
deploy_linux_asset_ub20:
needs: create_release
name: Upload Release (Ubuntu 20.04)
runs-on: ubuntu-latest
steps:
- name: Download Release Asset from Store
uses: actions/download-artifact@v4
with:
name: tsc-linux-asset-ub20
- name: Upload Release Asset (Ubuntu 20.04)
id: upload-release-asset-ub20
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./tsc-ub20.tar.gz
asset_name: tsc-ub20.tar.gz
asset_content_type: application/tar+gzip