Publish Extension for MacOS ARM64 (#55) #180
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 | |
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: Downlaod JRE MacOS x64 | |
run: node ./build.mjs download-jre --platform darwin | |
- name: Downlaod JRE MacOS arm64 | |
run: node ./build.mjs download-jre --platform darwin_arm64 | |
- name: Downlaod JRE Linux | |
run: node ./build.mjs download-jre --platform linux | |
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 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 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 vsce package --target darwin-arm64 | |
- name: Downlaod JRE Linux | |
run: node ./build.mjs download-jre --platform linux | |
- name: Package Linux extension | |
run: npx vsce package --target linux-x64 | |
- name: Publish extensions | |
run: npx vsce publish --pat ${{ secrets.VS_MARKETPLACE_TOKEN }} --packagePath vscode-natural-*.vsix |