Merge pull request #11 from TTB-Network/i18n #89
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: 自动 i18n | |
on: | |
push: | |
paths: | |
- '**.json' | |
- '**.js' | |
branches: | |
- main | |
jobs: | |
update_i18n: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 检出仓库 | |
uses: actions/checkout@v2 | |
- name: 配置 Node.js 环境 | |
uses: actions/[email protected] | |
- name: 安装依赖 | |
run: npm install | |
- name: 删除 i18n | |
run: rm -r i18n/zh-Hans | |
- name: 写入文件 | |
run: npm run write-translations -- --locale zh-Hans | |
- name: 提交文件 | |
run: | | |
git add i18n/zh-Hans | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git commit -a -m ":sparkles: 更新 i18n" | |
git push |