ソースを参照

Merge pull request #6060 from GeorgeK1ng/qt_workflow

Add automated Qt translation workflow
Ivan Savenko 1 ヶ月 前
コミット
759f207d8a
1 ファイル変更44 行追加0 行削除
  1. 44 0
      .github/workflows/qt_translation_update.yml

+ 44 - 0
.github/workflows/qt_translation_update.yml

@@ -0,0 +1,44 @@
+name: Weekly Qt translation refresh
+
+on:
+  schedule:
+    - cron: '0 0 * * 0'   # Runs every Sunday at 00:00 UTC
+  workflow_dispatch:
+
+permissions:
+  contents: write
+
+jobs:
+  refresh:
+    name: Qt translations refresh
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+        with:
+          ref: ${{ github.ref_name }}
+          fetch-depth: 0
+          submodules: false
+
+      - name: Install Qt tools (lupdate)
+        run: |
+          sudo apt install -y --no-install-recommends qttools5-dev-tools
+
+      - name: Update TS files (Launcher)
+        working-directory: launcher
+        run: |
+          lupdate . -ts translation/*.ts
+
+      - name: Update TS files (Map Editor)
+        working-directory: mapeditor
+        run: |
+          lupdate . -ts translation/*.ts
+
+      - name: Commit and push translation updates
+        uses: EndBug/add-and-commit@v9
+        with:
+          add: "launcher/translation mapeditor/translation"
+          default_author: github_actions
+          message: "Auto-update VCMI Qt translation files"
+          push: true