Merge pull request #133 from WentTheFox/l10n_main #90
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: Translation credits updater | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - l10n_main | |
| concurrency: | |
| group: ci-i18n-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| update-i18n-credits: | |
| name: 'Update i18n credits' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '20' | |
| - name: Cache node_modules folder | |
| id: cache-node-modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ./node_modules | |
| key: node_modules-${{ hashFiles('./package-lock.json') }} | |
| - name: Upgrade NPM | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: npm install -g npm | |
| - name: Install npm dependencies | |
| if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
| run: npm ci --ignore-scripts | |
| - name: Re-generate translation credits | |
| run: npm run prestart:dev | |
| env: | |
| CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} | |
| CROWDIN_PROJECT_IDENTIFIER: ${{ vars.CROWDIN_PROJECT_IDENTIFIER }} | |
| CROWDIN_DEVELOPER_ID: ${{ vars.CROWDIN_DEVELOPER_ID }} | |
| CROWDIN_REPORT_CACHE: false | |
| CROWDIN_REPORT_DEBUG: false | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: Update translation credits | |
| file_pattern: 'README.md src/locales/*.json' |