Skip to content

Commit

Permalink
ci: split build workflow into separate jobs for each OS
Browse files Browse the repository at this point in the history
  • Loading branch information
sajjadmrx committed Jun 13, 2024
1 parent bc8a19f commit c52ce29
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 14 deletions.
57 changes: 50 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,70 @@
name: Build
name: Build on push

on:
push:
branches-ignore: ["main"]
paths-ignore:
- "README.md"
- "README-*.md"
- ".github/ISSUE_TEMPLATE/*"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
build_on_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Install electron-builder
run: npm i electron-builder -g

- name: Build typescript files
run: npm run build:code



build_on_win:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Install electron-builder
run: npm i electron-builder -g

- name: Build typescript files
run: npm run build:code


build_on_macos:
runs-on: macOS-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
56 changes: 49 additions & 7 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,31 @@ on:
- "*.md"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_on_linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Install electron-builder
run: npm i electron-builder -g

- name: Build typescript files
run: npm run build:code



build_on_win:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -27,9 +46,32 @@ jobs:

- name: Install dependencies
run: npm ci

- name: Install electron-builder
run: npm i electron-builder -g

- name: Build typescript files
run: npm run build:code


build_on_macos:
runs-on: macOS-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Node v18
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Install electron-builder
run: npm i electron-builder -g

- name: Build
run: npm run build
- name: Build typescript files
run: npm run build:code

0 comments on commit c52ce29

Please sign in to comment.