name: Main
on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, synchronize, reopened]

permissions: read-all

jobs:
  Build:
    strategy:
      matrix:
        app_name: [Brainfuck, Breakout, Calculator, Diceware, EpubReader, GPIO, GraphicsDemo, HelloWorld, M5UnitTest, Magic8Ball, MediaKeys, MystifyDemo, SerialConsole, Snake, TamaTac, TodoList, TwoEleven]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: "Build"
        uses: ./.github/actions/build-app
        with:
          app_name: ${{ matrix.app_name }}
  Bundle:
    runs-on: ubuntu-latest
    needs: [Build]
    steps:
      - uses: actions/checkout@v4
      - name: "Build"
        uses: ./.github/actions/release-apps
