Skip to content

Crowdin Sync

Crowdin Sync #13

Workflow file for this run

name: Crowdin Sync
on:
push:
paths:
- 'lib/l10n/app_en.arb'
- 'fastlane/metadata/android/en-US/*.txt'
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: write
pull-requests: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: stable
- uses: crowdin/github-action@v2
with:
upload_sources: true
download_translations: true
create_pull_request: true
pull_request_title: 'New translations from Crowdin'
localization_branch_name: l10n_crowdin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Checkout the branch Crowdin created
run: git checkout l10n_crowdin
- name: Generate l10n files
run: flutter gen-l10n
- name: Commit generated files
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git diff --staged --quiet || git commit -m "Generate l10n files"
git push origin l10n_crowdin