chore: workflow #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |