-
Notifications
You must be signed in to change notification settings - Fork 40
646 lines (562 loc) · 25.6 KB
/
publish.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
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
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
name: publish bebop
on:
push:
tags:
- "v*"
jobs:
build-compiler:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-22.04]
include:
- os: macos-latest
IDENTIFIER: osx
ARTIFACT: bebopc
CHORD_ARTIFACT: chordc
- os: windows-latest
IDENTIFIER: win
ARTIFACT: bebopc.exe
CHORD_ARTIFACT: chordc.exe
- os: ubuntu-22.04
IDENTIFIER: linux
ARTIFACT: bebopc
CHORD_ARTIFACT: chordc
BUILD_WASI: true
env:
CONFIGURATION: Release
BUILD_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-x64/${{matrix.ARTIFACT}}
BUILD_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.IDENTIFIER}}-arm64/${{matrix.ARTIFACT}}
BUILD_ZIP_ARTIFACT_X86_64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-x64.zip
BUILD_ZIP_ARTIFACT_ARM64: ./bin/compiler/Release/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-arm64.zip
BUILD_ARTIFACT_WASI: ./bin/compiler/Release/artifacts/wasi-wasm/AppBundle/${{matrix.ARTIFACT}}.wasm
CHORD_ARTIFACT_X86_64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-x64/publish/${{matrix.CHORD_ARTIFACT}}
CHORD_ARTIFACT_ARM64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-arm64/publish/${{matrix.CHORD_ARTIFACT}}
CHORD_ZIP_ARTIFACT_X86_64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-x64/publish/chordc-${{matrix.IDENTIFIER}}-x64.zip
CHORD_ZIP_ARTIFACT_ARM64: ./extensions/chordc/bin/Release/net8.0/${{matrix.IDENTIFIER}}-arm64/publish/${{matrix.ARTIFACT}}-${{matrix.IDENTIFIER}}-arm64.zip
steps:
- uses: actions/checkout@v4
- name: Get Environment Variables
id: dotenv
uses: falti/[email protected]
# ubuntu is the fastest OS to spin up and if one fails they all fail.
- if: matrix.os == 'ubuntu-22.04'
name: Check if Versions Synced
run: |
if [[ ! refs/tags/v${{ steps.dotenv.outputs.version }} =~ ^(${{ github.ref }})$ ]]; then
echo "${{ steps.dotenv.outputs.version }} is not the same as ${{ github.ref }}. Did you bump the .env file?" 1>&2
exit 1
fi
- if: matrix.os == 'ubuntu-22.04'
name: Install Dependencies
run: |
sudo dpkg --add-architecture arm64
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
EOF'
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev zlib1g-dev:arm64 libkrb5-dev libtinfo5
- if: matrix.os == 'ubuntu-22.04' && matrix.BUILD_WASI
name: Install WASI Dependencies
run: ./install-wasi.sh
working-directory: ./scripts/
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
dotnet-quality: "preview"
- name: Build bebopc
run: |
dotnet restore
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-x64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=true -p:TrimMode=partial -p:PublishSingleFile=true --self-contained
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-arm64 -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} -p:PublishTrimmed=true -p:TrimMode=partial -p:PublishSingleFile=true --self-contained
working-directory: ./Compiler/
- if: matrix.os == 'ubuntu-22.04' && matrix.BUILD_WASI
name: Build bebopc for WASI
run: ./build-wasi.sh
working-directory: ./scripts/
- name: Build chordc
run: |
dotnet restore
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-x64
dotnet publish -c ${{env.CONFIGURATION}} -r ${{matrix.IDENTIFIER}}-arm64
working-directory: ./extensions/chordc
- if: matrix.os == 'macos-latest'
name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
# The password used to import the PKCS12 file.
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- if: matrix.os == 'macos-latest'
name: Install gon via HomeBrew for Code Signing and App Notarization
run: |
brew install mitchellh/gon/gon
- if: matrix.os == 'macos-latest'
name: Sign and zip macOS Binary
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: |
gon -log-level=trace -log-json ./gon-x64.json
unzip -j -o ./notarized-osx-x64.zip
rm -f ./notarized-osx-x64.zip
zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ./bebopc
rm -f ./bebopc
gon -log-level=trace -log-json ./gon-arm64.json
unzip -j -o ./notarized-osx-arm64.zip
rm -f ./notarized-osx-arm64.zip
zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ./bebopc
rm -f ./bebopc
- if: matrix.os == 'macos-latest'
name: Zip chordc macOS Binary
run: |
zip -j ${{env.CHORD_ZIP_ARTIFACT_X86_64}} ${{env.CHORD_ARTIFACT_X86_64}}
zip -j ${{env.CHORD_ZIP_ARTIFACT_ARM64}} ${{env.CHORD_ARTIFACT_ARM64}}
- if: matrix.os == 'ubuntu-22.04'
name: ZIP Linux Build
run: |
zip -j ${{env.BUILD_ZIP_ARTIFACT_X86_64}} ${{env.BUILD_ARTIFACT_X86_64}}
zip -j ${{env.BUILD_ZIP_ARTIFACT_ARM64}} ${{env.BUILD_ARTIFACT_ARM64}}
- if: matrix.os == 'ubuntu-22.04'
name: ZIP chordc Linux Build
run: |
zip -j ${{env.CHORD_ZIP_ARTIFACT_X86_64}} ${{env.CHORD_ARTIFACT_X86_64}}
zip -j ${{env.CHORD_ZIP_ARTIFACT_ARM64}} ${{env.CHORD_ARTIFACT_ARM64}}
- if: matrix.os == 'windows-latest'
name: ZIP Windows Build
shell: powershell
run: |
Compress-Archive -Path ${{env.BUILD_ARTIFACT_X86_64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_X86_64}}
Compress-Archive -Path ${{env.BUILD_ARTIFACT_ARM64}} -DestinationPath ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
- if: matrix.os == 'windows-latest'
name: ZIP chordc Windows Build
shell: powershell
run: |
Compress-Archive -Path ${{env.CHORD_ARTIFACT_X86_64}} -DestinationPath ${{env.CHORD_ZIP_ARTIFACT_X86_64}}
Compress-Archive -Path ${{env.CHORD_ARTIFACT_ARM64}} -DestinationPath ${{env.CHORD_ZIP_ARTIFACT_ARM64}}
- name: Upload X86_64 Build
uses: actions/upload-artifact@v3
with:
name: ${{matrix.IDENTIFIER}}-x64
path: ${{env.BUILD_ZIP_ARTIFACT_X86_64}}
- name: Upload ARM64 Build
uses: actions/upload-artifact@v3
with:
name: ${{matrix.IDENTIFIER}}-arm64
path: ${{env.BUILD_ZIP_ARTIFACT_ARM64}}
- if: matrix.os == 'ubuntu-22.04' && matrix.BUILD_WASI
name: Upload WASI_WASM Build
uses: actions/upload-artifact@v3
with:
name: wasi-wasm
path: ${{env.BUILD_ARTIFACT_WASI}}
- name: Upload chordc X86_64 Build
uses: actions/upload-artifact@v3
with:
name: chordc-${{matrix.IDENTIFIER}}-x64
path: ${{env.CHORD_ZIP_ARTIFACT_X86_64}}
- name: Upload chordc ARM64 Build
uses: actions/upload-artifact@v3
with:
name: chordc-${{matrix.IDENTIFIER}}-arm64
path: ${{env.CHORD_ZIP_ARTIFACT_ARM64}}
build-runtimes:
env:
NET_TEST_ROOT: ${{github.workspace}}/Laboratory/C#/Test
NET_RUNTIME_ROOT: ${{github.workspace}}/Runtime/C#
TS_TEST_ROOT: ${{github.workspace}}/Laboratory/TypeScript
TS_RUNTIME_ROOT: ${{github.workspace}}/Runtime/TypeScript
RUST_RUNTIME_ROOT: ${{github.workspace}}/Runtime/Rust
RUST_TEST_ROOT: ${{github.workspace}}/Laboratory/Rust
runs-on: ubuntu-22.04
needs: build-compiler
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v1
with:
node-version: "18.16.0" # LTS
- name: Get Environment Variables
id: dotenv
uses: falti/[email protected]
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
dotnet-quality: "preview"
- name: Test .NET Runtime
run: |
dotnet run --project ../../../Compiler/ --include $(ls -p ../../Schemas/Valid/*.bop | tr '\n' ' ') build --generator "cs:../GeneratedTestCode/Output.g.cs,namespace=Bebop.Codegen"
dotnet test -c Release -f net8.0
working-directory: ${{env.NET_TEST_ROOT}}
- name: Build .NET Runtime
run: |
dotnet restore
dotnet build -c Release -p:ReleaseVersion=${{ steps.dotenv.outputs.version }}
working-directory: ${{env.NET_RUNTIME_ROOT}}
- name: Upload .NET Runtime Package
uses: actions/upload-artifact@v3
with:
name: bebop-runtime-cs-${{ steps.dotenv.outputs.version }}
path: ${{env.NET_RUNTIME_ROOT}}/bin/Release/bebop.${{ steps.dotenv.outputs.version }}.nupkg
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Cargo Login
run: cargo login ${{ secrets.CRATES_TOKEN }}
- name: Download Compiler Artifacts
uses: actions/download-artifact@v2
- name: Extract Compiler Artifacts
run: |
mkdir -p ${{github.workspace}}/bin/compiler/Debug/artifacts
unzip -j -o ./linux-x64/bebopc-linux-x64.zip -d ${{github.workspace}}/bin/compiler/Debug/artifacts
ls
# todo: depend on a different job
- name: Test Rust Runtime
run: cargo test
working-directory: ${{ env.RUST_RUNTIME_ROOT }}
- name: Test Rust Labratory
run: |
cargo check -p auto-testing
cargo test -p functionality-testing
working-directory: ${{ env.RUST_TEST_ROOT }}
- name: Package Rust Runtime
working-directory: ${{ env.RUST_RUNTIME_ROOT }}
run: |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp
mv tmp Cargo.toml
cargo package --allow-dirty
- name: Upload Rust Runtime
uses: actions/upload-artifact@v3
with:
name: bebop-runtime-rust-${{steps.dotenv.outputs.version}}
path: ${{ env.RUST_RUNTIME_ROOT }}/target/package/bebop-${{ steps.dotenv.outputs.version }}.crate
- name: Build Typescript runtime
run: |
yarn install
yarn test
yarn build
working-directory: ${{env.TS_RUNTIME_ROOT}}
- name: Test TypeScript Runtime
run: |
yarn install
bash compile-schemas.sh
yarn test
working-directory: ${{env.TS_TEST_ROOT}}
- name: Pack TypeScript Runtime
run: |
jq '.version = "${{ steps.dotenv.outputs.version }}"' package.json > tmp && mv tmp package.json
yarn install
yarn pack
working-directory: ${{env.TS_RUNTIME_ROOT}}
- name: Upload TypeScript Runtime Package
uses: actions/upload-artifact@v3
with:
name: bebop-runtime-ts-${{ steps.dotenv.outputs.version }}
path: ${{env.TS_RUNTIME_ROOT}}/bebop-v${{ steps.dotenv.outputs.version }}.tgz
build-tools:
env:
TOOLS_ROOT: ${{github.workspace}}/Tools
BEBOPC_PATH: ${{github.workspace}}/Tools/bebopc
needs: build-compiler
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: actions/setup-node@v1
with:
node-version: "18.16.0" # LTS
- name: Get Environment Variables
id: dotenv
uses: falti/[email protected]
- name: Download Compiler Artifacts
uses: actions/download-artifact@v2
- name: Extract Compiler Artifacts
run: |
ls
unzip -j -o ./win-x64/bebopc.exe-win-x64.zip -d ${{env.BEBOPC_PATH}}/windows/x64
unzip -j -o ./win-arm64/bebopc.exe-win-arm64.zip -d ${{env.BEBOPC_PATH}}/windows/arm64
unzip -j -o ./osx-x64/bebopc-osx-x64.zip -d ${{env.BEBOPC_PATH}}/macos/x64
unzip -j -o ./osx-arm64/bebopc-osx-arm64.zip -d ${{env.BEBOPC_PATH}}/macos/arm64
unzip -j -o ./linux-x64/bebopc-linux-x64.zip -d ${{env.BEBOPC_PATH}}/linux/x64
unzip -j -o ./linux-arm64/bebopc-linux-arm64.zip -d ${{env.BEBOPC_PATH}}/linux/arm64
cp ./wasi-wasm/bebopc.wasm ${{env.BEBOPC_PATH}}/wasi/wasm
- name: Build NuGet Package
run: bash build.sh ${{ steps.dotenv.outputs.version }}
working-directory: ${{env.TOOLS_ROOT}}/vs
- name: Upload Nuget Artifact
uses: actions/upload-artifact@v3
with:
name: bebop-tools-nuget-${{ steps.dotenv.outputs.version }}
path: ${{env.TOOLS_ROOT}}/vs/packages/bebop-tools.${{ steps.dotenv.outputs.version }}.nupkg
- name: Package Cargo Tools
working-directory: ${{env.TOOLS_ROOT}}/cargo
run: |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp
mv tmp Cargo.toml
cargo package --allow-dirty
- name: Upload Cargo Tools
uses: actions/upload-artifact@v3
with:
name: bebop-tools-cargo-${{ steps.dotenv.outputs.version }}
path: ${{ env.TOOLS_ROOT }}/cargo/target/package/bebop-tools-${{ steps.dotenv.outputs.version }}.crate
- name: Copy Compiler Builds for NPM package
run: |
mkdir -p ${{env.TOOLS_ROOT}}/node/tools && cp -a ${{env.BEBOPC_PATH}}/. ${{env.TOOLS_ROOT}}/node/tools
- name: Build Tools NPM Package
run: |
jq '.version = "${{ steps.dotenv.outputs.version }}"' package.json > tmp && mv tmp package.json
yarn install
yarn pack
working-directory: ${{env.TOOLS_ROOT}}/node
- name: Upload NPM Artifact
uses: actions/upload-artifact@v3
with:
name: bebop-tools-npm-${{ steps.dotenv.outputs.version }}
path: ${{env.TOOLS_ROOT}}/node/bebop-tools-v${{ steps.dotenv.outputs.version }}.tgz
- name: Copy compiler builds for VSCode extension
run: |
mkdir -p ./vscode-bebop/compiler && cp -a ${{env.BEBOPC_PATH}}/. ./vscode-bebop/compiler
- name: Build VSCode extension
run: |
VERSION=$(echo ${{ steps.dotenv.outputs.version }} | sed 's/-.*//')
jq '.version = "'"$VERSION"'"' package.json > tmp && mv tmp package.json
npm install --global @vscode/vsce
yarn install
vsce package
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then
echo "Building pre-release package"
vsce package --pre-release
else
echo "Building standard package"
vsce package
fi
working-directory: ./vscode-bebop
- name: Upload VSCode artifact
uses: actions/upload-artifact@v3
with:
name: vscode-bebop
path: vscode-bebop/bebop-lang-*.vsix
publish-packages:
env:
RUST_RUNTIME_ROOT: ${{github.workspace}}/Runtime/Rust
TOOLS_ROOT: ${{github.workspace}}/Tools
runs-on: ubuntu-22.04
needs: [build-compiler, build-runtimes, build-tools]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v1
with:
node-version: "18.16.0" # LTS
registry-url: https://registry.npmjs.org/
- name: Get Environment Variables
id: dotenv
uses: falti/[email protected]
- id: release-info
name: Set Release Info
run: |
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then
echo "PRERELEASE=true" >> "$GITHUB_OUTPUT"
else
echo "PRERELEASE=false" >> "$GITHUB_OUTPUT"
fi
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "8.0.x" # SDK Version to use; x will use the latest version of the 7.0 channel
include-prerelease: true
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Cargo Login
run: cargo login ${{ secrets.CRATES_TOKEN }}
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Publish .NET Tools
run: dotnet nuget push bebop-tools-nuget-${{ steps.dotenv.outputs.version }}/bebop-tools.${{ steps.dotenv.outputs.version }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish .NET Runtime
run: dotnet nuget push bebop-runtime-cs-${{ steps.dotenv.outputs.version }}/bebop.${{ steps.dotenv.outputs.version }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish Rust Tools
run: |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp
mv tmp Cargo.toml
cargo publish --allow-dirty
working-directory: ${{env.TOOLS_ROOT}}/cargo
- name: Publish Rust Runtime
run: |
sed 's/^version \?= \?.*/version = "${{ steps.dotenv.outputs.version }}"/' Cargo.toml > tmp
mv tmp Cargo.toml
cargo publish --allow-dirty
working-directory: ${{env.RUST_RUNTIME_ROOT}}
- name: Publish NodeJS Tools
run: npm publish "./bebop-tools-npm-${{ steps.dotenv.outputs.version }}/bebop-tools-v${{ steps.dotenv.outputs.version }}.tgz" --access public ${{ steps.release-info.outputs.PRERELEASE == 'true' && '--tag next' || '' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Publish TypeScript Runtime
run: npm publish "./bebop-runtime-ts-${{ steps.dotenv.outputs.version }}/bebop-v${{ steps.dotenv.outputs.version }}.tgz" --access public ${{ steps.release-info.outputs.PRERELEASE == 'true' && '--tag next' || '' }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
- name: Publish VSCode Extension
continue-on-error: true
run: |
npm install --global @vscode/vsce
VERSION=$(echo ${{ steps.dotenv.outputs.version }} | sed 's/-.*//')
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then
echo "Publishing vscode pre-release package"
vsce publish --pre-release --packagePath ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.VSCE_TOKEN }}
else
echo "Publishing vscode standard package"
vsce publish --packagePath ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.VSCE_TOKEN }}
fi
- name: Publish Open VSX Extension
continue-on-error: true
run: |
npm i -g ovsx
VERSION=$(echo ${{ steps.dotenv.outputs.version }} | sed 's/-.*//')
if [[ $GITHUB_REF == refs/heads/vnext ]] || [[ $GITHUB_REF == refs/tags/*rc* ]] || [[ $GITHUB_REF == refs/tags/*alpha* ]] || [[ $GITHUB_REF == refs/tags/*beta* ]]; then
echo "Publishing ovsx pre-release package"
npx ovsx publish --pre-release ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.OPENVSX }}
else
echo "Publishing ovsx standard package"
npx ovsx publish ./vscode-bebop/bebop-lang-$VERSION.vsix -p ${{ secrets.OPENVSX }}
fi
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Bebop ${{ github.ref }}
draft: false
prerelease: ${{ steps.release-info.outputs.PRERELEASE == 'true' }}
- name: Upload Compiler for Windows x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./win-x64/bebopc.exe-win-x64.zip
asset_name: bebopc-windows-x64.zip
asset_content_type: application/zip
- name: Upload Compiler for Windows ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./win-arm64/bebopc.exe-win-arm64.zip
asset_name: bebopc-windows-arm64.zip
asset_content_type: application/zip
- name: Upload Compiler for Mac x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./osx-x64/bebopc-osx-x64.zip
asset_name: bebopc-macos-x64.zip
asset_content_type: application/zip
- name: Upload Compiler for Mac ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./osx-arm64/bebopc-osx-arm64.zip
asset_name: bebopc-macos-arm64.zip
asset_content_type: application/zip
- name: Upload Compiler for Linux x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./linux-x64/bebopc-linux-x64.zip
asset_name: bebopc-linux-x64.zip
asset_content_type: application/zip
- name: Upload Compiler for Linux ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./linux-arm64/bebopc-linux-arm64.zip
asset_name: bebopc-linux-arm64.zip
asset_content_type: application/zip
- name: Upload Compiler for WASM
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./wasi-wasm/bebopc.wasm
asset_name: bebopc.wasm
asset_content_type: application/wasm
- name: Upload chordc for Windows x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./chordc-win-x64/chordc.exe-win-x64.zip
asset_name: chordc-windows-x64.zip
asset_content_type: application/zip
- name: Upload chordc for Windows ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./chordc-win-arm64/chordc.exe-win-arm64.zip
asset_name: chordc-windows-arm64.zip
asset_content_type: application/zip
- name: Upload chordc for Mac x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./chordc-osx-x64/chordc-osx-x64.zip
asset_name: chordc-macos-x64.zip
asset_content_type: application/zip
- name: Upload chordc for Mac ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./chordc-osx-arm64/chordc-osx-arm64.zip
asset_name: chordc-macos-arm64.zip
asset_content_type: application/zip
- name: Upload chordc for Linux x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./chordc-linux-x64/chordc-linux-x64.zip
asset_name: chordc-linux-x64.zip
asset_content_type: application/zip
- name: Upload chordc for Linux ARM64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./chordc-linux-arm64/chordc-linux-arm64.zip
asset_name: chordc-linux-arm64.zip
asset_content_type: application/zip