chore: release v0.0.14 #35
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: Test and Release | |
# Run this job on all pushes to main and for pull requests | |
on: | |
push: | |
branches: | |
# This avoids having duplicate builds in non-forked PRs | |
- "main" | |
tags: | |
# normal versions | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
# pre-releases | |
- "v[0-9]+.[0-9]+.[0-9]+-**" | |
pull_request: {} | |
# Cancel previous PR/branch runs when a new commit is pushed | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# =================== | |
# Tests everything | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] # This should be LTS | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Compile | |
run: npm run build | |
- name: Lint | |
run: npm run lint | |
# =================== | |
# Deploys successful builds tagged with a version to the marketplace | |
deploy: | |
if: | | |
github.event_name == 'push' && | |
startsWith(github.ref, 'refs/tags/v') | |
needs: [test] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] # This should be LTS | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Install vsce | |
run: npm install -g @vscode/vsce | |
- name: Publish to the Open VSX Registry | |
uses: HaaLeo/[email protected] | |
id: publishToOpenVSX | |
with: | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
- name: Publish to the Visual Studio Marketplace | |
uses: HaaLeo/[email protected] | |
with: | |
pat: ${{ secrets.MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com | |
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }} |