name: Update translation files

on: workflow_dispatch

jobs:
  lupdate:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v3
        with:
          submodules: true

      - name: Install Qt
        uses: jurplel/install-qt-action@v3
        with:
          version: '6.5'

      - name: Run lupdate
        run: lupdate src/NotepadNext.pro

      - name: Commit translation changes
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Update translation files
          file_pattern: 'i18n/*.ts'
