Skip to content

Build VSIX (preview artifact) #5

Build VSIX (preview artifact)

Build VSIX (preview artifact) #5

name: Build VSIX (preview artifact)
on:
workflow_dispatch:
jobs:
build-vsix:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: win32-x64
- os: windows-latest
target: win32-arm64
- os: macos-latest
target: darwin-x64
- os: macos-latest
target: darwin-arm64
- os: ubuntu-latest
target: linux-x64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout (main)
uses: actions/checkout@v4
with:
ref: main
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install deps (root)
run: npm ci
- name: Install deps (vue_webview)
working-directory: vue_webview
run: npm ci
- name: Build
run: npm run build --if-present
- name: Package VSIX
run: npx @vscode/vsce package --target ${{ matrix.target }}
- name: Find VSIX filename
id: vsix
shell: bash
run: |
VSIX_FILE="$(ls -1 *.vsix | head -n 1)"
echo "file=$VSIX_FILE" >> "$GITHUB_OUTPUT"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vsix-main-${{ github.sha }}-${{ matrix.target }}
path: ${{ steps.vsix.outputs.file }}
if-no-files-found: error
retention-days: 14