Skip to content

Commit

Permalink
Run each build command on its respective OS
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Aug 10, 2023
1 parent ef2f8e7 commit b7da5e5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ jobs:
- run: npm test

build:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.platform.os }}
needs: tests
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
cmd: ["build:linux", "build:macos", "build:windows"]
platform:
[
{ os: "ubuntu-latest", cmd: "build:linux" },
{ os: "macos-11", cmd: "build:macos" },
{ os: "windows-latest", cmd: "build:windows" },
]
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down Expand Up @@ -89,7 +93,7 @@ jobs:
echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\Program Files\Git\mingw64\libexec\git-core" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: npm ci
- run: npm run ${{ matrix.cmd }}
- run: npm run ${{ matrix.platform.cmd }}
shell: bash
env:
VERSION: ${{ steps.package-version.outputs.version}}

0 comments on commit b7da5e5

Please sign in to comment.