Skip to content

Synchronize with Crowdin #55

Synchronize with Crowdin

Synchronize with Crowdin #55

Workflow file for this run

name: Synchronize with Crowdin
on:
workflow_dispatch:
push:
branches: [ develop ]
paths:
- l10n/en-US.json
schedule:
- cron: '0 */6 * * *'
concurrency:
group: crowdin-gh-actions
cancel-in-progress: false
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Delete old branch
uses: actions/github-script@v7
with:
script: |
const branchName = "l10n_develop";
const { data: branches } = await github.rest.repos.listBranches({
owner: context.repo.owner,
repo: context.repo.repo,
});
const branchExists = branches.some(branch => branch.name === branchName);
if (branchExists) {
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${branchName}`,
});
}
- name: crowdin action
uses: crowdin/github-action@v2
with:
config: "crowdin.yml"
upload_sources: true
upload_translations: false
download_translations: true
skip_untranslated_strings: true
export_only_approved: true
localization_branch_name: l10n_develop
create_pull_request: true
pull_request_title: "New Crowdin Translations"
pull_request_base_branch_name: "develop"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}