🌱 Create the vsix package from dist/
#415
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: CI (repo level) | |
on: | |
push: | |
branches: | |
- "main" | |
- "release-*" | |
pull_request: | |
paths-ignore: | |
- "docs/**" | |
branches: | |
- "main" | |
- "release-*" | |
workflow_dispatch: | |
workflow_call: | |
concurrency: | |
group: ci-repo-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
# https://typicode.github.io/husky/how-to.html#ci-server-and-docker | |
env: | |
HUSKY: 0 | |
jobs: | |
build: | |
name: Build (${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: linux | |
- os: macos-latest | |
arch: macos | |
- os: windows-latest | |
arch: windows | |
max-parallel: 3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "npm" | |
- name: Install workspace dependencies | |
run: | | |
npm ci | |
- name: Lint sources | |
run: | | |
npm run lint | |
- name: Build | |
run: | | |
npm run build | |
test: | |
name: Test (${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
needs: build | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: linux | |
- os: macos-latest | |
arch: macos | |
- os: windows-latest | |
arch: windows | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "npm" | |
- name: Install workspace dependencies | |
run: | | |
npm ci | |
# Run tests on Linux | |
- name: Run tests (Linux) | |
if: matrix.arch == 'linux' | |
run: xvfb-run -a npm test | |
# Run tests on macOS | |
- name: Run tests (macOS) | |
if: matrix.arch == 'macos' | |
run: npm test | |
# Run tests on Windows | |
- name: Run tests (Windows) | |
if: matrix.arch == 'windows' | |
shell: cmd | |
run: npm test | |
package: | |
name: Package (${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
needs: test | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: linux | |
- os: macos-latest | |
arch: macos | |
- os: windows-latest | |
arch: windows | |
max-parallel: 3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "npm" | |
- name: Install workspace dependencies | |
run: | | |
npm ci | |
- name: Build the project and generate the .vsix | |
run: | | |
npm run build | |
npm run collect-assets | |
npm run dist | |
npm run package | |
- name: Upload VSIX artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vscode-extension-${{ matrix.arch }} | |
path: "dist/*.vsix" |