Files
jake 31572816aa chore(ci): simplify Crowdin workflow and bump checkout action
- Upgrade `actions/checkout` from v4 → v6 in both upload and download jobs
- Remove manual `bun install` + compile + git commit steps from the download job — Crowdin's own action now handles committing updated PO files via `push_translations: true`
- Allow the download job to run on `schedule` events in addition to `workflow_dispatch`
2026-03-21 13:02:01 -04:00

56 lines
1.5 KiB
YAML

name: Crowdin Sync
on:
push:
branches: [main]
paths:
- "packages/i18n/src/po/en.po"
workflow_dispatch:
schedule:
- cron: "0 6 * * *"
permissions:
contents: write
pull-requests: write
jobs:
upload:
name: Upload sources
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v6
- name: Upload sources to Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
download_translations: false
config: crowdin.yml
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
download:
name: Download translations
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
steps:
- uses: actions/checkout@v6
- name: Download translations from Crowdin
uses: crowdin/github-action@v2
with:
upload_sources: false
upload_translations: false
download_translations: true
create_pull_request: true
pull_request_title: "chore(i18n): update translations from Crowdin"
pull_request_body: "Automated PR with latest translations from Crowdin."
config: crowdin.yml
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}