ci: Crowdin push sources

- allow manual uploading of crowdin sources, i.e. `en.json` split into
per-layout files

[no changelog]
This commit is contained in:
obrusvit
2025-10-16 14:38:42 +02:00
committed by Vít Obrusník
parent 0dee3ac0b3
commit 2ebb9dea9d

41
.github/workflows/crowdin-push.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Crowdin - push sources (manual)
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: crowdin-push
cancel-in-progress: false
jobs:
push:
name: Split and upload sources
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: crowdin
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Split en.json into per-layout files
working-directory: translations
run: python crowdin.py split
- name: Upload sources to Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: true
config: translations/crowdin.yml
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}