Test and create release (when run manually) #1854
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' || github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
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 |