Skip to content

Publish to Visual Studio Code Marketplace #5

Publish to Visual Studio Code Marketplace

Publish to Visual Studio Code Marketplace #5

Workflow file for this run

# This workflow publishes the extension to the VSCode marketplace when the version changes.
name: Publish to Visual Studio Code Marketplace
on: [push, workflow_dispatch]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
- name: Check version changes
if: github.event_name != 'workflow_dispatch'
uses: EndBug/version-check@v2
id: check
- name: Install dependencies
if: steps.check.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
run: npm install
- name: Publish
if: steps.check.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
run: |
npm run package
npm run publish -- -p "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}"