mirror of
https://github.com/trezor/trezor-firmware.git
synced 2026-02-20 00:33:30 +01:00
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:
41
.github/workflows/crowdin-push.yml
vendored
Normal file
41
.github/workflows/crowdin-push.yml
vendored
Normal 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 }}
|
||||
Reference in New Issue
Block a user