Skip to content

Publish Extension

Publish Extension #9

Workflow file for this run

name: Publish Extension
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
default: 'minor x.1.0'
type: choice
options:
- patch x.x.1
- minor x.1.0
- major 1.0.0
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Install the dependencies
run: npm i
- name: Install vsce
run: npm i -g vsce
- name: Publish
run: |
git config --global user.name "RedCMD"
git config --global user.email "[email protected]"
if [[ $(git diff --stat) != '' ]]; then
echo 'working directory dirty. must cleanup first'
git add .
git commit -m "Publish to npm"
fi
vsce publish ${{ github.event.inputs.version }} -p ${{ secrets.VSCE_PAT }}
git push