add at code review workflow #76
Workflow file for this run
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: Build | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: npm | |
- name: Build and Package | |
run: | | |
npm ci | |
npm run build | |
npx vsce package | |
env: | |
CI: true | |
- name: Automatic Semantic Release | |
uses: cycjimmy/semantic-release-action@v3 | |
id: semantic | |
with: | |
extra_plugins: | | |
@semantic-release/changelog | |
@semantic-release/git | |
branch: main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to Visual Studio Marketplace | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: | | |
npx vsce publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
- name: Publish to OpenVSX | |
if: steps.semantic.outputs.new_release_published == 'true' | |
run: | | |
npx ovsx publish | |
env: | |
OVSX_PAT: ${{ secrets.OVSX_PAT }} |