Skip to content

chore: workflow

chore: workflow #2

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: [20.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