-
-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (55 loc) · 1.73 KB
/
crowdin.yml
File metadata and controls
66 lines (55 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Crowdin Sync
on:
schedule:
- cron: '0 0 * * *' # Every day at midnight UTC.
workflow_dispatch:
concurrency:
group: crowdin-sync
cancel-in-progress: false
jobs:
crowdin:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install Crowdin CLI
run: npm install -g @crowdin/cli@4.14.2
- name: Upload source strings
run: crowdin upload sources
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
- name: Download translations
run: crowdin download
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
- name: Detect translation changes
id: changes
run: |
if git diff --quiet -- src/ui/Translations; then
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
echo "has_changes=true" >> "$GITHUB_OUTPUT"
fi
- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: crowdin/translations
delete-branch: true
commit-message: "[ci skip] Update translations"
title: "translations: sync Crowdin translations"
body: |
Automated translation sync from Crowdin.