-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for publishing to OpenVsx (#496)
Publish the Dafny VScode extension to OpenVSX (https://open-vsx.org/) as well.
- Loading branch information
1 parent
a4506cb
commit f71f690
Showing
1 changed file
with
13 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,26 +12,22 @@ jobs: | |
- name: "Prepare: Checkout Repository" | ||
uses: actions/checkout@v2 | ||
- name: "Prepare: Use Node.js ${{ matrix.node-version }}" | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: v16.x | ||
node-version: v22.x | ||
#- name: "Prepare: Setup sonarqube" | ||
# uses: warchant/setup-sonar-scanner@v1 | ||
#- run: npm install -g npm@latest | ||
- run: npm install -g [email protected] | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm run vscode:prepublish | ||
#- run: npm test | ||
# env: | ||
# CI: true | ||
- name: "Prepare: Package VSCode Extension" | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: v16.x | ||
#- run: npm install -g npm@latest | ||
- run: npm install -g [email protected] | ||
- run: npm install -g [email protected] | ||
node-version: v22.x | ||
- run: npm install -g @vscode/[email protected] | ||
- run: vsce package --out dist/ | ||
|
||
|
||
|
@@ -43,7 +39,7 @@ jobs: | |
# -Dsonar.login=${{ secrets.SONAR_TOKEN }} | ||
|
||
- name: "Upload Artifact: VSIX Packages" | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: package | ||
path: dist/*.vsix | ||
|
@@ -128,11 +124,17 @@ jobs: | |
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} | ||
|
||
- run: npm install -g vsce@1.96.1 | ||
- run: npm install -g @vscode/vsce@2.15.0 | ||
- run: vsce publish -p "${MARKETPLACE_TOKEN}" --packagePath dist/${PACKAGE_NAME}-${VERSION}.vsix | ||
env: | ||
# Note: Marketplace Token according to: | ||
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token | ||
# The token is only valid for a limited time - renewal might be required. | ||
MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }} | ||
VERSION: ${{ steps.get_version.outputs.VERSION }} | ||
|
||
- run: npm install -g [email protected] | ||
- run: ovsx publish -p "${OPENVSX_NAMESPACE_TOKEN}" --packagePath dist/${PACKAGE_NAME}-${VERSION}.vsix | ||
env: | ||
OPENVSX_NAMESPACE_TOKEN: ${{ secrets.OPENVSX_NAMESPACE_TOKEN }} | ||
VERSION: ${{ steps.get_version.outputs.VERSION }} |