Skip to content

Commit

Permalink
ci: add job when push on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Dafyh committed Aug 5, 2024
1 parent 9fb905b commit a630288
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit a630288

Please sign in to comment.