12
12
13
13
strategy :
14
14
matrix :
15
- lang : [ru, ko, ja, zh-CN ]
15
+ lang : [ru]
16
16
17
17
steps :
18
18
- name : Checkout code
@@ -28,37 +28,21 @@ jobs:
28
28
- name : Install Crowdin CLI
29
29
run : npm install -g @crowdin/cli
30
30
31
- - name : Download completed translations
32
- env :
33
- CROWDIN_PERSONAL_TOKEN : ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
34
- run : |
35
- crowdin download --export-only-approved --branch main --config crowdin-oss.yml --language=${{ matrix.lang }}
36
-
37
31
- name : Configure Git
38
32
run : |
39
33
git config user.name "github-actions[bot]"
40
34
git config user.email "github-actions[bot]@users.noreply.github.com"
41
35
42
- - name : Create translations branch
43
- run : |
44
- git checkout -B l10n-release-candidate-${{ matrix.lang }}
45
-
46
36
- name : Commit and push translations
37
+ env :
38
+ CROWDIN_PERSONAL_TOKEN : ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
39
+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
47
40
run : |
41
+ git stash --include-untracked
42
+ git checkout -b l10n-release-candidate-${{ matrix.lang }}
43
+ git pull --rebase origin l10n-release-candidate-${{ matrix.lang }} || true
44
+ crowdin download --export-only-approved --branch main --config crowdin-oss.yml --language=${{ matrix.lang }}
48
45
git add i18n/${{ matrix.lang }}
49
- git diff --quiet --cached || ( \
50
- git commit -m "chore: update ${{ matrix.lang }} translations" && \
51
- git push -u origin l10n-release-candidate-${{ matrix.lang }} \
52
- )
53
-
54
- - name : Create Pull Request
55
- uses : peter-evans/create-pull-request@v5
56
- with :
57
- token : ${{ secrets.GH_TOKEN }}
58
- commit-message : " chore: update ${{ matrix.lang }} translations"
59
- branch : l10n-release-candidate-${{ matrix.lang }}
60
- base : release-candidate-${{ matrix.lang }}
61
- title : " Update ${{ matrix.lang }} translations — release-candidate-${{ matrix.lang }}"
62
- body : |
63
- This automated PR updates only the fully translated `${{ matrix.lang }}` files.
64
- labels : translation, automated
46
+ git commit -m "chore: update ${{ matrix.lang }} translations"
47
+ git push -u origin l10n-release-candidate-${{ matrix.lang }} || true
48
+ gh pr create -B release-candidate-${{ matrix.lang }} -H l10n-release-candidate-${{ matrix.lang }} --title "chore: update `${{ matrix.lang }}` translations" --body 'This automated PR updates only the fully translated `${{ matrix.lang }}` files.' || true
0 commit comments