Skip to content

Commit

Permalink
ci: add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Belar committed Oct 16, 2024
1 parent f4abc73 commit 73d9f26
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on: [push, pull_request]

permissions:
# Required for Electron Builder to create and update releases on Github
contents: write

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os}}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: Build
if: ${{ (github.head_ref || github.ref_name) != 'main' }}
run: |
npm run build -- --x64 --arm64 --publish=never
- name: Build and publish
if: ${{ (github.head_ref || github.ref_name) == 'main' }}
run: |
npm run build -- --x64 --arm64
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 73d9f26

Please sign in to comment.