This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
config.yml
110 lines (110 loc) · 3.15 KB
/
config.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
version: 2
jobs:
fetch:
working_directory: ~/cp-translations
docker:
- image: circleci/node:8
steps:
- checkout
- run:
name: Install Crowdin CLI
command: |
sudo apt-get update
sudo apt-get install ruby-dev rubygems
sudo gem install mime-types -v 2.6.2
sudo gem install rest-client -v 1.8
sudo gem install crowdin-cli -v 0.5.5
- run:
name: Install deps
command: yarn
- run:
name: Download translations
command: |
for lang in it pt-PT de nl ro mt sl sk fr uk es-ES es-AR el pl et bg tr ja hi lt zh-CN id si-LK ur-PK zh-TW fil ar; do crowdin-cli download -l $lang; done
no_output_timeout: 20m
- save_cache:
key: translations-{{ .Branch }}-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
paths:
- email-templates
- strings
test:
working_directory: ~/cp-translations
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: translations-{{ .Branch }}-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
- run:
name: Install deps
command: yarn
- run:
name: Test translations
command: yarn test
lex:
working_directory: ~/cp-translations
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: translations-{{ .Branch }}-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
- run:
name: Install deps
command: yarn
- run:
name: Test translations
command: yarn lex
publish:
working_directory: ~/cp-translations
docker:
- image: circleci/node:8
steps:
- add-ssh-keys:
fingerprints:
- "7c:58:32:cd:93:00:d6:85:ff:34:84:1b:a1:e7:ee:39"
- checkout
- restore_cache:
key: translations-{{ .Branch }}-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
- run:
name: Setup .npmrc
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
name: Install Crowdin CLI
command: |
sudo apt-get update
sudo apt-get install ruby-dev rubygems
sudo gem install mime-types -v 2.6.2
sudo gem install rest-client -v 1.8
sudo gem install crowdin-cli -v 0.5.5
- run:
name: Upload sources
command: crowdin-cli upload sources
- run:
name: Publish to NPM
command: |
git config --global user.email "[email protected]"
git config --global user.name "CoderDojo Foundation"
npm version patch -m "[skip ci] Update to %s"
git push
npm publish
workflows:
version: 2
test-and-deploy:
jobs:
- fetch
- test:
requires:
- fetch
- lex:
requires:
- fetch
- publish:
requires:
- test
- lex
filters:
branches:
only:
- master