Skip to content

Publish VSCode Extension #7

Publish VSCode Extension

Publish VSCode Extension #7

Workflow file for this run

name: Publish VSCode Extension
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 1.0.0)'
required: true
default: ''
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: |
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi
- name: Update version if manually triggered
if: github.event_name == 'workflow_dispatch'
run: |
npm version ${{ github.event.inputs.version }} --no-git-tag-version
git config user.name github-actions
git config user.email github-actions@github.com
git add package.json
git commit -m "Bump version to ${{ github.event.inputs.version }}"
git push
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com