Add action to upload messages file to Crowdin (#3121)

10.9-maintenance
Míguel Ángel Mulero Martínez 2022-12-08 14:32:36 +01:00 committed by GitHub
parent 402b7323a8
commit 6ee30ea293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 1 deletions

View File

@ -27,6 +27,11 @@ jobs:
with:
debug_build: true
upload-translations:
name: Upload translations
needs: ci
uses: ./.github/workflows/translations-upload.yml
release:
name: Nightly release
needs: ci

View File

@ -23,12 +23,12 @@ jobs:
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
config: 'crowdin.yml'
crowdin_branch_name: ${{ github.ref_name }}
upload_sources: false
upload_translations: false
download_translations: true
crowdin_branch_name: master
download_translations_args: '-l ca -l da -l de -l es-ES -l eu -l fr -l gl -l hr -l hu -l id -l it -l ja -l ko -l lv -l nl -l pt-PT -l pt-BR -l pl -l ru -l sv-SE -l zh-CN -l zh-TW'
localization_branch_name: update_translations_crowdin
push_translations: true

View File

@ -0,0 +1,29 @@
name: Translations upload to Crowdin
on:
workflow_call:
workflow_dispatch:
jobs:
betaflight-messages-to-crowdin:
name: Messages file to Crowdin
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Upload messages file
uses: crowdin/github-action@1.5.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
config: 'crowdin.yml'
crowdin_branch_name: ${{ github.ref_name }}
upload_sources: true
upload_translations: false
download_translations: false

View File

@ -1,3 +1,7 @@
# ID used by the upload action to Crowdin
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
#
# Files configuration
#