Skip to content

Commit

Permalink
chore: workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng zhen committed Oct 11, 2024
1 parent 5164da0 commit 31312cc
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Test Electron App

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

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

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: |
npm ci
npm run postinstall
- name: Build
run: npm run build

- name: Run tests
run: npm test

- name: Lint
run: npm run lint

- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
github_token: ${{ secrets.token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist_${{ matrix.os }}
path: dist

0 comments on commit 31312cc

Please sign in to comment.