|
@@ -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
|