name: Build finalize (3DS)

on:
  push:
    paths:
      - 'finalize/**'
  pull_request:
    paths:
      - 'finalize/**'

jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: devkitpro/devkitarm:20260219

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

      - name: Build finalize module
        working-directory: finalize
        run: make

      - name: Upload build artifacts
        uses: actions/upload-artifact@v4
        with:
          name: finalize-3dsx
          path: |
            finalize/custom-install-finalize.3dsx
            finalize/custom-install-finalize.elf
            finalize/custom-install-finalize.smdh
