Skip to content

Merge branch 'update-ci-workflow' into development #51

Merge branch 'update-ci-workflow' into development

Merge branch 'update-ci-workflow' into development #51

Workflow file for this run

name: CI
on:
push:
branches: [main, development]
tags:
- 'v*'
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test
- name: Build
run: npm run compile
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm install
- name: Audit dependencies
run: npm audit
- name: Install VSCE
run: npm install -g vsce
- name: Package Extension
run: vsce package
- name: Publish Extension
run: vsce publish -p ${{ secrets.AZURE_DEVOPS_PAT }}
env:
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
pre-release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') && github.ref == 'refs/heads/development'
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm install
- name: Audit dependencies
run: npm audit
- name: Install VSCE
run: npm install -g vsce
- name: Package Extension (Pre-release)
run: vsce package --pre-release
- name: Publish Extension (Pre-release)
run: vsce publish --pre-release -p ${{ secrets.AZURE_DEVOPS_PAT }}
env:
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}