on:
  push:
    branches:
      - main
  pull_request:

jobs:
  build:
    name: Build App
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Checkout assets
        run: git -c submodule."assets".update=checkout submodule update --init assets

      - name: Setup Mise
        uses: immich-app/devtools/actions/use-mise@cd24790a7f5f6439ac32cc94f5523cb2de8bfa8c # use-mise-action-v1.1.0
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Install dependencies
        run: pnpm install

      - name: Build
        run: pnpm run package
