-
Notifications
You must be signed in to change notification settings - Fork 20
50 lines (44 loc) · 1.42 KB
/
locize-sync.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
name: Translation sync added and deleted keys to locize
on: workflow_dispatch
jobs:
locize-sync:
runs-on: ubuntu-latest
environment: CI
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
always-auth: true
- name: Setup Cognite CICD Yarn
run: |
echo "
npmScopes:
cognite:
npmAlwaysAuth: true
npmAuthToken: \"\${NPM_TOKEN}\"
npmRegistryServer: "https://registry.npmjs.org"
" >> .yarnrc.yml
env:
NPM_TOKEN: ${{ secrets.NPM_READONLY_TOKEN }}
- name: Install NPM dependencies
working-directory: react-components
run: yarn install --immutable
env:
NPM_TOKEN: ${{ secrets.NPM_READONLY_TOKEN }}
- name: 'Save added keys to locize'
working-directory: react-components
run: yarn save-missing
env:
NPM_TOKEN: ${{ secrets.NPM_READONLY_TOKEN }}
LOCIZE_API_KEY: ${{ secrets.LOCIZE_API_KEY }}
- name: 'Remove deleted keys from locize'
working-directory: react-components
run: yarn remove-deleted
env:
NPM_TOKEN: ${{ secrets.NPM_READONLY_TOKEN }}
LOCIZE_API_KEY: ${{ secrets.LOCIZE_API_KEY }}