Export translations from Crowdin #186
This file contains hidden or 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 translations from Crowdin | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| env: | |
| TIMER_CROWDIN_AUTH: ${{ secrets.TIMER_CROWDIN_AUTH }} | |
| steps: | |
| - name: Prepare branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| token: ${{secrets.GITHUB_TOKEN}} | |
| - name: Test using Node.js | |
| uses: actions/setup-node@v1 | |
| with: | |
| node-version: "v22" | |
| - name: Install ts-node | |
| run: npm i -g ts-node | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Export translations | |
| run: ts-node --project ./tsconfig.node.json ./script/crowdin/export-translation.ts | |
| - name: Test typescript | |
| uses: icrawl/action-tsc@v1 | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| commit-message: "i18n(download): download translations by bot" | |
| branch: crowdin-export/patch | |
| title: "i18n(download): download translations by bot" | |
| body: "Automated download translations from [Crowdin](https://crowdin.com/project/timer-chrome-edge-firefox)" | |
| author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" | |
| sign-commits: true | |
| labels: "i18n" |