name: CI

on:
  push:
    branches: [master]
  pull_request:
  workflow_dispatch:

permissions:
  contents: write

jobs:
  build-appimage:
    if: github.event_name != 'pull_request'
    uses: ./.github/workflows/build-appimage.yml

  build-macos:
    uses: ./.github/workflows/build-macos.yml
    secrets: inherit

  build-ubuntu:
    uses: ./.github/workflows/build-ubuntu.yml
    secrets: inherit

  build-windows:
    uses: ./.github/workflows/build-windows.yml
    secrets: inherit

  release:
    if: github.event_name != 'pull_request'
    needs: [build-appimage, build-macos, build-windows]
    uses: ./.github/workflows/release.yml
    secrets: inherit
