-
Notifications
You must be signed in to change notification settings - Fork 17
32 lines (32 loc) · 1.15 KB
/
crowdin-export.yml
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
name: Export translations from Crowdin
on: [workflow_dispatch]
jobs:
sync:
runs-on: ubuntu-latest
env:
TIMER_CROWDIN_AUTH: ${{ secrets.TIMER_CROWDIN_AUTH }}
steps:
- name: Checkout branch i18n-export
uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{secrets.GITHUB_TOKEN}}
ref: i18n-export
- name: Test using Node.js
uses: actions/setup-node@v1
with:
node-version: "v20.11.0"
- name: Install ts-node
run: npm i -g ts-node
- name: Install dependencies
run: npm install
- name: Export translations
run: ts-node ./script/crowdin/export-translation.ts
- name: Commit change
run: |
git config --global user.name 'Crowdin Bot'
git config --global user.email 'returnzhy1996@outlook.com'
git add .
git commit -m "Export translations by Github Action"
- name: Push change
run: git push