aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorChristian Gade <christian_gade@hotmail.com>2020-10-29 19:46:52 +0100
committerChristian Gade <christian_gade@hotmail.com>2020-10-29 19:46:52 +0100
commita7a15ca1977ba3a4ee365298e0181229f8083297 (patch)
treeebe5ab52c9ee3d456a1cb2f1de4724a909467001 /.github
parent9ccbafc416602ad6421d4dd0b9db97a0cb38f068 (diff)
Create gh-action-weblate-upload.yml
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/gh-action-weblate-upload.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/gh-action-weblate-upload.yml b/.github/workflows/gh-action-weblate-upload.yml
new file mode 100644
index 0000000000..db2474e6aa
--- /dev/null
+++ b/.github/workflows/gh-action-weblate-upload.yml
@@ -0,0 +1,28 @@
+# This GitHub action updates the translation (msgmrge) based on the changed source language file
+
+name: Update Weblate translations
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - "addons/resource.language.en_gb/resources/strings.po"
+ - ".github/workflows/gh-action-weblate-upload.yml"
+jobs:
+ weblate:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2.3.2
+ with:
+ fetch-depth: 0
+ - name: Update Weblate
+ env:
+ TOKEN: "${{ secrets.WEBLATE_TOKEN }}"
+ run: |
+ curl -v \
+ --form file=@addons/resource.language.en_gb/resources/strings.po \
+ --form method=source \
+ -H "Authorization: Token $TOKEN" \
+ https://kodi.weblate.cloud/api/translations/kodi-core/kodi-main/en_gb/file/