-
Notifications
You must be signed in to change notification settings - Fork 274
65 lines (54 loc) · 1.82 KB
/
crowdin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Crowdin Action
on:
workflow_dispatch:
concurrency: crowdin-dev
jobs:
synchronize-with-crowdin:
name: Synchronize with Crowdin
environment: "dev-crowdin"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
.yarn/cache
.yarn/install-state.gz
.eslintcache
**/tsconfig.tsbuildinfo
**/.types/**
**/.types-*/**
key: build-cache-${{ hashFiles('yarn.lock') }}
restore-keys: |
build-cache-
- name: Install dependencies
run: yarn
- name: Restore Crowdin Cache
uses: actions/cache/restore@v3
with:
path: _crowdin
key: crowdin-cache-${{ github.ref_name }}
- name: Run pre-Crowdin script for file preparation
run: yarn workspace @starknet-io/cms-scripts pre-crowdin
- name: Upload source files to Crowdin project
run: yarn crowdin upload -b ${{ github.ref_name }}
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Download approved translations from Crowdin
run: yarn crowdin download -b ${{ github.ref_name }} --export-only-approved --skip-untranslated-strings
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Save Crowdin Cache
uses: actions/cache/save@v3
with:
path: _crowdin
key: crowdin-cache-${{ github.ref_name }}