Pull Translations From Crowdin #699
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Translations From Crowdin | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */3 * * *" # Run every 3 hours | |
jobs: | |
synchronize-with-crowdin: | |
runs-on: macos-14 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Crowdin CLI | |
run: brew install crowdin | |
shell: sh | |
- name: Download Translations | |
run: crowdin bundle download 6 | |
shell: sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.CROWDIN_GITHUB_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
- name: Set up Ruby environment | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.0 | |
- name: Install bundler | |
run: gem install bundler | |
- name: Install dependencies | |
run: bundle install | |
- name: Install SwiftLint | |
run: brew install swiftlint | |
- name: Import XLIFFs to project | |
uses: ./.github/workflows/actions/run_lane | |
with: | |
lane: xliff_import | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.CROWDIN_PR_BOT_TOKEN }} | |
commit-message: Update Localizations | |
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
branch: crowdin/update-translations-bot | |
base: develop | |
delete-branch: true | |
add-paths: | | |
Vocable/**/*.xcstrings | |
Vocable/**/*.strings | |
title: '[CI] Update Localizations' | |
body: | | |
Automated localization update from Crowdin. | |
labels: | | |
localization | |
automated | |
draft: false |