Use esbuild to bundle dependencies #188
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 | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- run: npm install --no-package-lock | |
- name: lint | |
run: npm run lint | |
- run: xvfb-run -a npm test | |
if: runner.os == 'Linux' | |
- run: npm test | |
if: runner.os != 'Linux' | |
test-jre-download: | |
runs-on: ubuntu-latest | |
name: Test JRE Download and Package | |
steps: | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- uses: actions/checkout@v3 | |
- run: npm install --no-package-lock | |
- name: Downlaod JRE Windows | |
run: node ./build.mjs download-jre --platform win32 | |
- name: Package Windows Extension | |
run: npx @vscode/vsce package --target win32-x64 | |
- name: Downlaod JRE MacOS x64 | |
run: node ./build.mjs download-jre --platform darwin | |
- name: Package MacOS x64 Extension | |
run: npx @vscode/vsce package --target darwin-x64 | |
- name: Downlaod JRE MacOS arm64 | |
run: node ./build.mjs download-jre --platform darwin_arm64 | |
- name: Package MacOS arm64 Extension | |
run: npx @vscode/vsce package --target darwin-arm64 | |
- name: Downlaod JRE Linux | |
run: node ./build.mjs download-jre --platform linux | |
- name: Package Linux Extension | |
run: npx @vscode/vsce package --target linux-x64 | |
publish: | |
needs: [build] | |
if: ${{ startsWith(github.event.ref, 'refs/tags/v') && needs.build.result == 'success' }} | |
runs-on: ubuntu-latest | |
name: Release Extension | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Build | |
run: npm install --no-package-lock | |
- name: Downlaod Language Server | |
run: node ./build.mjs download-server | |
- name: Downlaod JRE Windows | |
run: node ./build.mjs download-jre --platform win32 | |
- name: Package Windows extension | |
run: npx @vscode/vsce package --target win32-x64 | |
- name: Downlaod JRE MacOS x64 | |
run: node ./build.mjs download-jre --platform darwin | |
- name: Package MacOS x64 extension | |
run: npx @vscode/vsce package --target darwin-x64 | |
- name: Downlaod JRE MacOS arm64 | |
run: node ./build.mjs download-jre --platform darwin_arm64 | |
- name: Package MacOS arm64 extension | |
run: npx @vscode/vsce package --target darwin-arm64 | |
- name: Downlaod JRE Linux | |
run: node ./build.mjs download-jre --platform linux | |
- name: Package Linux extension | |
run: npx @vscode/vsce package --target linux-x64 | |
- name: Publish extensions | |
run: npx @vscode/vsce publish --pat ${{ secrets.VS_MARKETPLACE_TOKEN }} --packagePath vscode-natural-*.vsix |