name: Regenerate POT file (translatable strings)
on:
  schedule:
    - cron: "00 16 * * 5"
  workflow_dispatch:

jobs:
  regenerate-pot-file:
    name: Release
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        branch: ["develop"]
    permissions:
      contents: write

    steps:
        - name: Checkout
          uses: actions/checkout@v4
          with:
            ref: ${{ matrix.branch }}

        - name: Setup Python
          uses: actions/setup-python@v6
          with:
            python-version: "3.14"

        - name: Setup Node.js
          uses: actions/setup-node@v6
          with:
            node-version: 24

        - name: Run script to update POT file
          run: |
            bash ${GITHUB_WORKSPACE}/.github/helper/update_pot_file.sh
          env:
            GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
            BASE_BRANCH: ${{ matrix.branch }}
