Skip to content

Commit

Permalink
test build all and publish extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvinn Ng committed May 5, 2024
1 parent ab316f0 commit 1183960
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,23 @@ on:

jobs:
build:
name: Build on darwin-arm64
runs-on: macos-latest
name: Build on ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
include:
- os: windows
arch: win32-x64
- os: windows
arch: win32-arm64
- os: macos
arch: darwin-x64
- os: macos
arch: darwin-arm64
- os: linux
arch: linux-x64
- os: linux
arch: linux-arm64

steps:
- name: Checkout repo
Expand All @@ -26,21 +41,26 @@ jobs:

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

- name: Run build script
run: |
cd extensions/vscode
node scripts/prepackage --target "darwin-arm64"
mkdir build
node_modules/@vscode/vsce/vsce package --out ./build --target "darwin-arm64"
node scripts/prepackage --target "${{ matrix.arch }}"
mkdir -p build
node_modules/@vscode/vsce/vsce package --out ./build --target "${{ matrix.arch }}"
cd build
echo "VSIX_FILE=$(ls *.vsix)" >> $GITHUB_ENV
- name: Publish Extension
run: |
cd extensions/vscode/build
../node_modules/@vscode/vsce/vsce publish --pat ${{ secrets.VS_MARKETPLACE_TOKEN }} --packagePath ${{ env.VSIX_FILE }}
- name: Archive build artifacts
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 1183960

Please sign in to comment.