Skip to content

Visual Studio store upload #12

Visual Studio store upload

Visual Studio store upload #12

Workflow file for this run

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 }}