diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0107be2..f673b5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,46 @@ name: Build and Retrieve Compiled Files on: + push: + branches: + - main pull_request: types: [opened, reopened, synchronize] jobs: - build: + push_on_main: + if: github.event_name == 'push' + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-22.04 + platform: linuxmusl-x64 + - os: ubuntu-22.04 + platform: linux-x64 + - os: macos-12 + platform: darwin-x64 + - os: windows-latest + platform: win32-x64 + - os: windows-latest + platform: win32-ia32 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install dependencies and test + run: | + npm install + npm run test + + pull_request: + if: github.event_name == 'pull_request' runs-on: ${{ matrix.os }} strategy: matrix: