Publish #1677
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
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: Install dependencies | |
run: npm install | |
- name: Install vsce (Visual Studio Extension Manager) | |
run: npm install -g vsce | |
- name: Publish to VSCode marketplace | |
run: | | |
git config --global user.email [email protected] > /dev/null 2>&1 | |
git config --global user.name dangerismycat > /dev/null 2>&1 | |
npm run generate:snippets | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Update snippets" | |
yes | vsce publish patch -p $VSCE_TOKEN | |
git push origin main | |
env: | |
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} |