Publish to VSCode Marketplace #11
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
# This workflow publishes the extension to the VSCode marketplace when the version changes. | |
name: Publish to VSCode Marketplace | |
on: | |
# Run whenever a new commit is pushed to the main branch. | |
push: | |
branches: [ main ] | |
paths: [ 'package.json' ] | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: detect version | |
uses: EndBug/[email protected] | |
id: check | |
if: github.event_name != 'workflow_dispatch' | |
with: | |
# Search the diff content for version changes. | |
diff-search: true | |
- name: publish | |
run: | | |
npm install | |
npm run package | |
npm run publish -- -p "${{ secrets.VSCODE_MARKETPLACE_TOKEN }}" |