name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
workflow_call:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Test and package (${{ matrix.platform }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 20
defaults:
run:
shell: ${{ matrix.shell }}
strategy:
fail-fast: false
matrix:
include:
- platform: windows-x64
runner: windows-latest
shell: pwsh
args: --win nsis --x64
artifact: release/*.exe
- platform: macos-arm64
runner: macos-15
shell: zsh -e {0}
args: --mac dmg --arm64
artifact: release/*.dmg
- platform: macos-x64
runner: macos-15-intel
shell: zsh -e {0}
args: --mac dmg --x64
artifact: release/*.dmg
- platform: linux-x64
runner: ubuntu-24.04
shell: bash
args: --linux AppImage --x64
artifact: release/*.AppImage
env:
CSC_IDENTITY_AUTO_DISCOVERY: "false"
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
- name: Set build version
run: node scripts/set-build-version.mjs
- run: npm ci --no-audit --no-fund
- run: npm test
- run: npm run build
- name: Check desktop startup
if: runner.os != 'Linux'
timeout-minutes: 1
run: npm run check:desktop -- --user-data-dir="${{ runner.temp }}/aggregate-mail-check"
- name: Create installer
run: npx --no-install electron-builder ${{ matrix.args }} --publish never
- name: Upload installer
uses: actions/upload-artifact@v5
with:
name: installer-${{ matrix.platform }}
path: ${{ matrix.artifact }}
if-no-files-found: error
retention-days: 1
compression-level: 0
overwrite: true