-
Notifications
You must be signed in to change notification settings - Fork 11
567 lines (502 loc) · 25.4 KB
/
test.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
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2011-2021 ETH Zurich.
name: Test and create release (when run manually)
on:
push: # run this workflow on every push
pull_request: # run this workflow on every pull_request
workflow_dispatch: # allow to manually trigger this workflow
inputs:
type:
type: choice
description: 'Specifies whether a stable release, nightly release or release candidate should be triggered.'
required: true
default: 'nightly'
options:
- stable
- nightly
- rc
tag_name:
description: 'Tag name for stable release.'
required: true
default: '-'
release_name:
description: 'Release title for stable release.'
required: true
default: '-'
# note that release-candidate builds are treated like 'stable' builds for now except that there is no deployment to the marketplaces in the end.
# in the future, this should be changed such that release-candidates result in a prerelease (like nightly builds).
# the following env variables configure the behavior of this workflow
# in particular, they control whether Viper-IDE is tested against certain ViperTools and a ViperServer JAR on push and pull requests
# this is particularly useful during debugging / testing as a new Viper-IDE release is not necessary for every change to the ViperServer JAR
env:
TEST_LOCAL_ON_PUSH_PR: false
# note that the following URL is extended with `/${{ matrix.viper-tools-zip-file }}` in the 'build-and-test' job:
TEST_LOCAL_ON_PUSH_PR_VIPERTOOLS_URL: https://github.com/viperproject/viper-ide/releases/download/v-2022-09-21-1611
# the following URL is not extended and downloading the destination is expected to return the viperserver.jar:
TEST_LOCAL_ON_PUSH_PR_VIPERSERVER_URL: https://polybox.ethz.ch/index.php/s/54sDcqHDJHelKBY/download
jobs:
build-and-test:
name: build-and-test - ${{ matrix.target }}
strategy:
# tests should not be stopped when they fail on one of the OSes:
fail-fast: false
matrix:
target: ["darwin-x64", "darwin-arm64", "linux-x64", "win32-x64"]
include:
- target: "darwin-x64"
os: macos-latest
viper-tools-zip-file: "ViperToolsMac.zip"
- target: "darwin-arm64"
os: ubuntu-latest # since GitHub does not have ARM macs, we can't test anyway and use Ubuntu instead for building
viper-tools-zip-file: "ViperToolsMacARM.zip"
- target: "linux-x64"
os: ubuntu-latest
viper-tools-zip-file: "ViperToolsLinux.zip"
- target: "win32-x64"
os: windows-latest
viper-tools-zip-file: "ViperToolsWin.zip"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Viper-IDE
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '18' # Should match the version in client/src/test/data/vscode-version
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- run: java --version
- name: Cache npm
uses: actions/cache@v4
with:
path: client/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# npm ci fails to clone GitHub repos referenced in package.json with recent node versions
# the following work around has been proposed here: https://github.com/actions/setup-node/issues/214#issuecomment-810829250
- name: Reconfigure git to use HTTPS authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- run: npm ci --cache .npm --prefer-offline
working-directory: client
# there are two different scenarios in which different stuff should be tested:
# - regular changes to Viper-IDE: the normal test configuration should be used, which tests against the latest stable and
# nightly ViperTool releases. Any change to the Viper-IDE have ensure compatability
# - before releasing Viper-IDE together with some ViperTools, Viper-IDE has to be tested against the latest stable and
# nightly ViperTool releases AND the ViperTools that should be released.
- name: Download ViperTools to test against (only downloading previously created ViperTools)
if: ${{ contains(needs.create-viper-tools.result, 'success') }}
uses: actions/download-artifact@v4
with:
name: ViperTools
path: client/ViperTools
- name: Setup ViperTools folder
if: ${{ fromJSON(env.TEST_LOCAL_ON_PUSH_PR) && !contains(needs.create-viper-tools.result, 'success') }}
run: mkdir -p client/ViperTools
- name: Download ViperTools to test against (only downloading ViperTools for PUSH and PR operations if configured accordingly)
if: ${{ fromJSON(env.TEST_LOCAL_ON_PUSH_PR) && !contains(needs.create-viper-tools.result, 'success') }}
run: curl --fail --silent --show-error -L ${{ env.TEST_LOCAL_ON_PUSH_PR_VIPERTOOLS_URL }}/${{ matrix.viper-tools-zip-file }} --output ${{ matrix.viper-tools-zip-file }}
working-directory: client/ViperTools
- name: Unzip ViperTools (non-windows)
if: ${{ !startsWith(matrix.os, 'windows') && (fromJSON(env.TEST_LOCAL_ON_PUSH_PR) || contains(needs.create-viper-tools.result, 'success')) }}
run: unzip ${{ matrix.viper-tools-zip-file }} -d ExtractedTools
working-directory: client/ViperTools
- name: Unzip ViperTools (windows)
if: ${{ startsWith(matrix.os, 'windows') && (fromJSON(env.TEST_LOCAL_ON_PUSH_PR) || contains(needs.create-viper-tools.result, 'success')) }}
run: powershell Expand-Archive -LiteralPath ${{ matrix.viper-tools-zip-file }} -DestinationPath ExtractedTools
working-directory: client/ViperTools
- name: Download ViperServer JAR (only downloading ViperTools for PUSH and PR operations if configured accordingly)
if: ${{ fromJSON(env.TEST_LOCAL_ON_PUSH_PR) && !contains(needs.create-viper-tools.result, 'success') }}
run: curl --fail --silent --show-error -L ${{ env.TEST_LOCAL_ON_PUSH_PR_VIPERSERVER_URL }} --output viperserver.jar
working-directory: client/ViperTools/ExtractedTools/backends
- name: Create path to extracted tools (non-windows)
if: ${{ !startsWith(matrix.os, 'windows') && (fromJSON(env.TEST_LOCAL_ON_PUSH_PR) || contains(needs.create-viper-tools.result, 'success')) }}
run: |
echo "EXTRACTED_TOOLS_PATH=${{ github.workspace }}/client/ViperTools/ExtractedTools" >> $GITHUB_ENV
shell: bash
- name: Create path to extracted tools (windows)
if: ${{ startsWith(matrix.os, 'windows') && (fromJSON(env.TEST_LOCAL_ON_PUSH_PR) || contains(needs.create-viper-tools.result, 'success')) }}
# replace all backslashes by double backslashes to properly escape them in the resulting JSON
run: |
PATH='EXTRACTED_TOOLS_PATH=${{ github.workspace }}\client\ViperTools\ExtractedTools'
echo ${PATH//'\'/'\\'} >> $GITHUB_ENV
shell: bash
- name: Create an additional test config
if: ${{ fromJSON(env.TEST_LOCAL_ON_PUSH_PR) || contains(needs.create-viper-tools.result, 'success') }}
run: |
mkdir -p client/src/test/data/settings
echo '{
"viperSettings.buildVersion": "External",
"viperSettings.paths": {
"v": "674a514867b1",
"viperToolsPath": {
"windows": "${{ env.EXTRACTED_TOOLS_PATH }}",
"linux": "${{ env.EXTRACTED_TOOLS_PATH }}",
"mac": "${{ env.EXTRACTED_TOOLS_PATH }}"
}
},
"viperserver.trace.server": "verbose"
}' > client/src/test/data/settings/external.json
shell: bash
- name: Get config content
if: ${{ fromJSON(env.TEST_LOCAL_ON_PUSH_PR) || contains(needs.create-viper-tools.result, 'success') }}
run: cat client/src/test/data/settings/external.json
shell: bash
- name: Run tests (headless - non-ubuntu)
if: "!startsWith(matrix.os, 'ubuntu') && matrix.target != 'darwin-arm64'"
run: npm run test --full-trace -- --target=${{ matrix.target }}
working-directory: client
env:
VIPER_IDE_LOG_DIR: ${{ github.workspace }}/client/logs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests (headless - ubuntu only)
if: startsWith(matrix.os, 'ubuntu') && matrix.target != 'darwin-arm64'
run: xvfb-run -a npm run test --full-trace -- --target=${{ matrix.target }}
working-directory: client
env:
VIPER_IDE_LOG_DIR: ${{ github.workspace }}/client/logs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Viper-IDE log files
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v4
with:
name: TestLogs-${{ matrix.target }}
path: client/logs
- name: Clean 'dist' folder
run: npm run clean
working-directory: client
# `npm run package` resp. `@vscode/vsce` complains that it cannot find
# locate-java-home and vs-verification-toolbox dependencies (the two non-npm dependencies).
# this seems related to https://github.com/npm/cli/issues/791
# the current workaround is to `run npm install` first:
# this workaround is only necessary when using node 14
# - name: Run 'npm install' as a workaround to later being able to package Viper-IDE (ubuntu only)
# if: startsWith(matrix.os, 'ubuntu')
# run: npm install
# working-directory: client
# use @vscode/vsce to package the extension into a vsix file.
# sets a special field in package.json to indicate that the package is not a pre-release (it's one
# by default)
- name: Package Viper-IDE extension (stable release only)
if: ${{ github.event.inputs.type == 'stable' }}
run: npm run package -- --target=${{ matrix.target }} --out=viper-ide-${{ matrix.target }}.vsix
working-directory: client
- name: Package Viper-IDE extension (non-stable release only)
if: ${{ github.event.inputs.type != 'stable' }}
run: npm run package -- --target=${{ matrix.target }} --out=viper-ide-${{ matrix.target }}.vsix --pre-release
working-directory: client
# we have to list the files after packaging because packaging first downloads dependencies
- name: List all files that got packaged (ignore 'viper-ide-${{ matrix.target }}.vsix')
run: npx @vscode/vsce ls
working-directory: client
- name: Upload packaged Viper-IDE
uses: actions/upload-artifact@v4
with:
name: viper-ide-${{ matrix.target }}.vsix
path: client/viper-ide-${{ matrix.target }}.vsix
# note that we change into the tool folder to zip it. This avoids including the parent folder in the zip
- name: Zip ViperTools (non-windows)
if: ${{ !startsWith(matrix.os, 'windows') }}
run: zip -r ../${{ matrix.viper-tools-zip-file }} ./*
working-directory: client/dependencies/ViperTools
- name: Zip ViperTools (windows only)
if: ${{ startsWith(matrix.os, 'windows') }}
run: Compress-Archive -Path ./* -Destination ../${{ matrix.viper-tools-zip-file }}
working-directory: client/dependencies/ViperTools
- name: Upload ViperTools zip files
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.viper-tools-zip-file }}
path: client/dependencies/${{ matrix.viper-tools-zip-file }}
create-release:
# this job creates a nightly release or stable draft-release and adds viper-ide.vsix and Viper Tools as release assets
if: github.event_name == 'workflow_dispatch'
needs: build-and-test
runs-on: ubuntu-latest
steps:
# we have to checkout the repo to read client/package.json later on:
- name: Checkout Viper-IDE
uses: actions/checkout@v4
- name: Download packaged Viper IDE
uses: actions/download-artifact@v4
with:
pattern: viper-ide-*.vsix
merge-multiple: true
path: client
- name: Download ViperTools
uses: actions/download-artifact@v4
with:
pattern: ViperTools*.zip
merge-multiple: true
- name: Read versions
run: |
echo "BOOGIE_VERSION=$(cat boogie-version)" >> $GITHUB_ENV
echo "BOOGIE_VERSION_URL=https://github.com/viperproject/boogie-builder/releases/$BOOGIE_VERSION" >> $GITHUB_ENV
echo "VIPERSERVER_VERSION=$(cat viperserver-version)" >> $GITHUB_ENV
echo "VIPERSERVER_VERSION_URL=https://github.com/viperproject/viperserver/releases/$VIPERSERVER_VERSION" >> $GITHUB_ENV
echo "Z3_VERSION=$(cat z3-version)" >> $GITHUB_ENV
echo "Z3_VERSION_URL=https://github.com/Z3Prover/z3/releases/z3-$Z3_VERSION" >> $GITHUB_ENV
working-directory: client
- name: Create release tag
if: ${{ github.event.inputs.type != 'stable' && github.event.inputs.type != 'rc' }}
shell: bash
run: echo "TAG_NAME=$(date +v-%Y-%m-%d-%H%M)" >> $GITHUB_ENV
# use the following action if nightly releases should eventually be deleted
# - name: Create nightly release
# if: ${{ github.event.inputs.type != 'stable' && github.event.inputs.type != 'rc' }}
# id: create_nightly_release
# uses: viperproject/create-nightly-release@v1
# env:
# # This token is provided by Actions, you do not need to create your own token
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ env.TAG_NAME }}
# release_name: Nightly Release ${{ env.TAG_NAME }}
# body: Based on ViperServer release ${{ github.event.inputs.viperserver_tag_name }}
# keep_num: 1 # keep the previous nightly release such that there are always two
# because e.g. prusti-dev depends on the nightly releases and updates only twice a month to the
# latest version, nightly releases should be kept
- name: Create nightly release
if: ${{ github.event.inputs.type != 'stable' && github.event.inputs.type != 'rc' }}
id: create_nightly_release
uses: actions/create-release@v1
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: Nightly Release ${{ env.TAG_NAME }}
body: |
Based on
- ViperServer release [`${{ env.VIPERSERVER_VERSION }}`](${{ env.VIPERSERVER_VERSION_URL }})
- [Z3 `${{ env.Z3_VERSION }}`](${{ env.Z3_VERSION_URL }})
- [Boogie release `${{ env.BOOGIE_VERSION }}`](${{ env.BOOGIE_VERSION_URL }})
draft: false
prerelease: true
- name: Store nightly release upload URL
if: ${{ github.event.inputs.type != 'stable' && github.event.inputs.type != 'rc' }}
shell: bash
run: echo "UPLOAD_URL=${{ steps.create_nightly_release.outputs.upload_url }}" >> $GITHUB_ENV
- name: Create stable draft-release
if: ${{ github.event.inputs.type == 'stable' || github.event.inputs.type == 'rc' }}
id: create_stable_release
uses: actions/create-release@v1
env:
# This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag_name }}
release_name: ${{ github.event.inputs.release_name }}
body: |
Based on
- ViperServer release [`${{ env.VIPERSERVER_VERSION }}`](${{ env.VIPERSERVER_VERSION_URL }})
- [Z3 `${{ env.Z3_VERSION }}`](${{ env.Z3_VERSION_URL }})
- [Boogie release `${{ env.BOOGIE_VERSION }}`](${{ env.BOOGIE_VERSION_URL }})
draft: true
prerelease: false
- name: Store stable release upload URL
if: ${{ github.event.inputs.type == 'stable' || github.event.inputs.type == 'rc' }}
shell: bash
run: echo "UPLOAD_URL=${{ steps.create_stable_release.outputs.upload_url }}" >> $GITHUB_ENV
- name: Upload packaged Viper IDE for Linux
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: client/viper-ide-linux-x64.vsix
asset_name: viper-ide-linux-x64.vsix
asset_content_type: application/octet-stream
- name: Upload packaged Viper IDE for macOS
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: client/viper-ide-darwin-x64.vsix
asset_name: viper-ide-darwin-x64.vsix
asset_content_type: application/octet-stream
- name: Upload packaged Viper IDE for macOS ARM
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: client/viper-ide-darwin-arm64.vsix
asset_name: viper-ide-darwin-arm64.vsix
asset_content_type: application/octet-stream
- name: Upload packaged Viper IDE for Windows
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: client/viper-ide-win32-x64.vsix
asset_name: viper-ide-win32-x64.vsix
asset_content_type: application/octet-stream
- name: Upload ViperTools for Windows
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ViperToolsWin.zip
asset_name: ViperToolsWin.zip
asset_content_type: application/zip
- name: Upload ViperTools for Ubuntu
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ViperToolsLinux.zip
asset_name: ViperToolsLinux.zip
asset_content_type: application/zip
- name: Upload ViperTools for macOS Intel
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ViperToolsMac.zip
asset_name: ViperToolsMac.zip
asset_content_type: application/zip
- name: Upload ViperTools for macOS ARM
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ViperToolsMacARM.zip
asset_name: ViperToolsMacARM.zip
asset_content_type: application/zip
# compare version in client/package.json with last published version on
# VS Marketplace and deploy this version if newer.
# credits go to @fpoli!
- name: Obtain version information
run: |
VSCE_OUTPUT="$(
npx @vscode/vsce show viper-admin.viper --json
)"
if [[ $(echo $VSCE_OUTPUT | grep --fixed-strings --line-regexp undefined) ]]; then
LAST_PUBLISHED_VERSION="0"
else
LAST_PUBLISHED_VERSION="$(
echo $VSCE_OUTPUT | jq '.versions[0].version' --raw-output
)"
fi
CURRENT_VERSION="$(
cat client/package.json | jq '.version' --raw-output
)"
echo "LAST_PUBLISHED_VERSION=$LAST_PUBLISHED_VERSION" >> $GITHUB_ENV
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
# publish 'stable' releases (release-candidates will be released as pre-releases below)
- name: Publish the extension to Visual Studio Marketplace for Linux
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-linux-x64.vsix
packagePath: ''
- name: Publish the extension to Visual Studio Marketplace for macOS
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-darwin-x64.vsix
packagePath: ''
- name: Publish the extension to Visual Studio Marketplace for macOS ARM
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-darwin-arm64.vsix
packagePath: ''
- name: Publish the extension to Visual Studio Marketplace for Windows
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-win32-x64.vsix
packagePath: ''
- name: Publish the extension to Open VSX Registry for Linux
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
registryUrl: https://open-vsx.org
extensionFile: client/viper-ide-linux-x64.vsix
packagePath: ''
- name: Publish the extension to Open VSX Registry for macOS
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
registryUrl: https://open-vsx.org
extensionFile: client/viper-ide-darwin-x64.vsix
packagePath: ''
- name: Publish the extension to Open VSX Registry for macOS ARM
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
registryUrl: https://open-vsx.org
extensionFile: client/viper-ide-darwin-arm64.vsix
packagePath: ''
- name: Publish the extension to Open VSX Registry for Windows
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'stable' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
registryUrl: https://open-vsx.org
extensionFile: client/viper-ide-win32-x64.vsix
packagePath: ''
# publish 'rc' releases as pre-releases
- name: Publish the extension to Visual Studio Marketplace for Linux (as pre-release)
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'rc' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-linux-x64.vsix
packagePath: ''
preRelease: true
- name: Publish the extension to Visual Studio Marketplace for macOS (as pre-release)
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'rc' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-darwin-x64.vsix
packagePath: ''
preRelease: true
- name: Publish the extension to Visual Studio Marketplace for macOS ARM (as pre-release)
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'rc' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-darwin-arm64.vsix
packagePath: ''
preRelease: true
- name: Publish the extension to Visual Studio Marketplace for Windows (as pre-release)
uses: HaaLeo/publish-vscode-extension@v1
if: ${{ github.event.inputs.type == 'rc' && env.CURRENT_VERSION != env.LAST_PUBLISHED_VERSION }}
with:
pat: ${{ secrets.VSCE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: client/viper-ide-win32-x64.vsix
packagePath: ''
preRelease: true