Skip to content

Commit

Permalink
use in built vsce to build for different architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvinn Ng committed May 2, 2024
1 parent a356dd4 commit 6c69590
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:

jobs:
build:
name: Build on ${{ matrix.os }}
name: Package Extension
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
platform: [ win32-x64, win32-ia32, win32-arm64, linux-x64, linux-arm64, linux-armhf, darwin-x64, darwin-arm64, alpine-x64, alpine-arm64 ]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -28,28 +28,13 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
pwsh install-dependencies.ps1
else
bash install-dependencies.sh
fi
run: bash install-dependencies.sh
shell: bash

- name: Run build script
run: |
os_name="${{ matrix.os }}"
if [ "$os_name" == "windows-latest" ]; then
os_suffix="win32"
elif [ "$os_name" == "macos-latest" ]; then
os_suffix="darwin"
elif [ "$os_name" == "ubuntu-latest" ]; then
os_suffix="linux"
fi
cd extensions/vscode && npm install vsce && npx @vscode/vsce package --out build/ patch
run: cd extensions/vscode && npm install vsce && npx @vscode/vsce package --target ${{ matrix.platform }}

- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: ahrefs-continue-$os_suffix.vsix
path: extensions/vscode/build/*.vsix
path: extensions/vscode/*.vsix

0 comments on commit 6c69590

Please sign in to comment.