name: json_conversion

on:
  push:
    branches:
      - main
    paths:
      - "Scribe-i18n/jsons/**.json"

jobs:
  # Run JSON to app strings conversion scripts if needed.
  convert_json:
    runs-on: ubuntu-latest
    steps:
      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: 3.12
      - name: Execute scripts to convert JSONs to app files
        working-directory: scripts
        run: |
          python android/convert_jsons_to_strings.py
          python ios/convert_jsons_to_xcstrings.py
