-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build release and publish on VSCode's Marketplace and OpenVSX | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build the vsix | ||
run: npx vsce package -o weaudit.vsix | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "weaudit" | ||
path: "weaudit.vsix" | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: success() | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: "weaudit" | ||
|
||
# Uncomment the following lines to also publish the extension on the VSCode Marketplace | ||
# - name: Publish Extension on VSCode's Marketplace | ||
# run: npx vsce publish --pat ${{ secrets.VSCODE_PUBLISHING_TOKEN }} --packagePath weaudit.vsix | ||
|
||
- name: Publish Extension on OpenVSX | ||
run: npx ovsx publish --pat ${{ secrets.WEAUDIT_OPENVSX_TOKEN }} --packagePath weaudit.vsix | ||
|
||
- name: Add vsix to the release assets | ||
uses: actions/upload-release-asset@v1.0.2 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: weaudit.vsix | ||
asset_name: weaudit.vsix | ||
asset_content_type: application/octet-stream | ||
token: ${{ secrets.GITHUB_TOKEN }} |