name: AirAppMarket Validate

on:
  push:
    paths:
      - "airappmarket/**"
      - ".github/workflows/airappmarket-validate.yml"
  pull_request:
    paths:
      - "airappmarket/**"
      - ".github/workflows/airappmarket-validate.yml"

jobs:
  validate:
    runs-on: ubuntu-latest

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

      - name: Setup .NET
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: "10.0.x"

      - name: Validate AirAppMarket index
        run: dotnet run --project airappmarket/tools/AirAppMarket.Validator -- airappmarket/index.json airappmarket/schema/airappmarket-index.schema.json
