Visual Studio store upload #12
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
name: Visual Studio store upload | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
publish_vsx: | |
description: 'Upload to the main store (even if not a tag)' | |
required: true | |
default: false | |
publish_open_vsx: | |
description: 'Upload to the open vsx store (even if not a tag)' | |
required: true | |
default: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: npm install -g vsce | |
- run: npm install | |
- run: npm run build | |
- run: vsce package | |
- name: Publish to Open VSX Registry | |
if: success() && (startsWith(github.ref, 'refs/tags/') || ${{ github.event.inputs.publish_open_vsx }}) | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
- name: Publish to the main store | |
if: success() && (startsWith(github.ref, 'refs/tags/') || ${{ github.event.inputs.publish_vsx }}) | |
run: npm run deploy | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |