Export translations from Crowdin #3
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: Export Crowdin | |
on: [workflow_dispatch] | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
env: | |
TIMER_CROWDIN_AUTH: ${{ secrets.TIMER_CROWDIN_AUTH }} | |
GITHUB_LOGIN: sheepzh | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- 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 add . | |
git commit -m "Export translations by Github Action" | |
- name: Push change | |
run: git push https://$GITHUB_LOGIN:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git | |