aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/gh-action-weblate-upload.yml
blob: 34493398f7e21cf3d7ab47bf9846c23d3a35bfdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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 \
            --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/