2021-05-29 23:44:26 +03:00
|
|
|
name: Crowdin Upload
|
2021-05-29 05:48:04 +03:00
|
|
|
|
2021-05-29 23:44:26 +03:00
|
|
|
# on any push to main, we upload the translations to be translated
|
2021-05-29 05:48:04 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
synchronize-with-crowdin:
|
2021-05-29 23:44:26 +03:00
|
|
|
name: Upload sources to Crowdin
|
2021-05-29 05:48:04 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-05-29 23:32:51 +03:00
|
|
|
- name: Set up node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
registry-url: https://registry.npmjs.org
|
|
|
|
|
2021-05-30 04:06:49 +03:00
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
|
2021-05-29 23:32:51 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
- name: Extract translations
|
|
|
|
run: "yarn lingui extract --locale en-US"
|
|
|
|
|
2021-05-29 05:48:04 +03:00
|
|
|
- name: Synchronize
|
|
|
|
uses: crowdin/github-action@1.1.0
|
|
|
|
with:
|
2021-05-29 06:06:15 +03:00
|
|
|
upload_sources: true
|
2021-05-29 23:44:26 +03:00
|
|
|
download_translations: false
|
2021-05-29 05:48:04 +03:00
|
|
|
project_id: 458284
|
2021-05-29 05:55:29 +03:00
|
|
|
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN_SECRET }}
|
2021-05-29 07:15:07 +03:00
|
|
|
source: 'src/locales/en-US.po'
|
2021-05-29 23:48:16 +03:00
|
|
|
translation: 'src/locales/%locale%.po'
|
2021-05-29 05:48:04 +03:00
|
|
|
env:
|
2021-05-29 06:07:15 +03:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|