Build VSCode Extension (multi-platform) #13
This file contains hidden or 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: Build VSCode Extension (multi-platform) | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel] | |
| node: [20] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'npm' | |
| - name: Install dependencies (including dev) | |
| run: npm ci | |
| - name: Compile TypeScript | |
| run: npm run compile | |
| - name: Package VSIX | |
| shell: bash | |
| run: | | |
| case "${{ matrix.os }}" in | |
| windows-latest) | |
| npx @vscode/vsce package --target win32-x64 | |
| ;; | |
| ubuntu-latest) | |
| npx @vscode/vsce package --target linux-x64 | |
| ;; | |
| macos-latest) | |
| npx @vscode/vsce package --target darwin-arm64 | |
| ;; | |
| macos-15-intel) | |
| npx @vscode/vsce package --target darwin-x64 | |
| ;; | |
| esac | |
| - name: Upload VSIX artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vscode-extension-${{ matrix.os }} | |
| path: '*.vsix' |