File tree 4 files changed +68
-23
lines changed
4 files changed +68
-23
lines changed Original file line number Diff line number Diff line change 1
1
version : 2.1
2
2
orbs :
3
3
node : circleci/node@5
4
+ aliases :
5
+ - &release-branches
6
+ - develop
7
+ - /^hotfix\//
8
+ commands :
9
+ deploy_gh_pages :
10
+ steps :
11
+ - run :
12
+ name : deploy to GH Pages
13
+ command : |
14
+ if [ -n "$GH_PAGES_REPO" ]; then
15
+ export GIT_AUTHOR_EMAIL="$(git log --pretty=format:"%ae" -n1)"
16
+ export GIT_AUTHOR_NAME="$(git log --pretty=format:"%an" -n1)"
17
+ export GIT_COMMITTER_EMAIL="${GIT_AUTHOR_EMAIL}"
18
+ export GIT_COMMITTER_NAME="${GIT_AUTHOR_NAME}"
19
+ npm run deploy -x -r $GH_PAGES_REPO
20
+ fi
4
21
jobs :
5
- branch-job :
22
+ build_no_release :
23
+ executor : node/default # defaults to LTS
24
+ steps :
25
+ - checkout
26
+ - node/install-packages
27
+ - run : npm test
28
+ - run : npx commitlint --from=`git merge-base HEAD develop`
29
+ - run : npm run build
30
+ - deploy_gh_pages
31
+ build_and_release :
6
32
executor : node/default # defaults to LTS
7
33
steps :
8
- - checkout
9
- - node/install-packages
10
- - run : npm test
11
- - run : npx commitlint --from=`git merge-base HEAD develop`
12
- - run : npm run build
13
- release-job :
34
+ - checkout
35
+ - node/install-packages
36
+ - run : npm test
37
+ - run : npx commitlint --from='HEAD~1'
38
+ - run : npm run build
39
+ - deploy_gh_pages
40
+ - run : npx semantic-release
41
+ update_i18n :
14
42
executor : node/default # defaults to LTS
15
43
steps :
16
- - checkout
17
- - node/install-packages
18
- - run : npm test
19
- - run : npx commitlint --from='HEAD~1'
20
- - run : npm run build
21
- - run : npx semantic-release
44
+ - checkout
45
+ - node/install-packages
46
+ - run : npm run i18n:src && npm run i18n:push
22
47
workflows :
23
48
version : 2
24
- branch-workflow :
49
+ build_no_release :
50
+ jobs :
51
+ - build_no_release :
52
+ filters :
53
+ branches :
54
+ ignore : *release-branches
55
+ build_and_release :
25
56
jobs :
26
- - branch-job :
57
+ - build_and_release :
27
58
filters :
28
59
branches :
29
- ignore :
30
- - develop
31
- release-workflow :
60
+ only : *release-branches
61
+ update_i18n :
32
62
jobs :
33
- - release-job :
63
+ - update_i18n
64
+ triggers :
65
+ - schedule :
66
+ cron : 0 0 * * * # daily at midnight UTC = 7-8pm US Eastern
34
67
filters :
35
68
branches :
36
- only :
37
- - develop
69
+ only : develop
Original file line number Diff line number Diff line change @@ -9,3 +9,7 @@ trim_trailing_whitespace = true
9
9
10
10
[* .{js,html} ]
11
11
indent_style = space
12
+
13
+ [.circleci/config.yml ]
14
+ indent_size = 2
15
+ indent_style = space
Original file line number Diff line number Diff line change 14
14
"scripts" : {
15
15
"build" : " npm run docs && webpack --progress --colors --bail" ,
16
16
"coverage" : " tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov" ,
17
- "deploy" : " touch playground/.nojekyll && gh-pages -t -d playground -m \" Build for $(git log -- pretty=format:%H -n1) \" " ,
17
+ "deploy" : " touch playground/.nojekyll && gh-pages -t -d playground -m \" Build for $(git log -n1 -- pretty=format:\" %h %s \" ) [skip ci] \" " ,
18
18
"docs" : " jsdoc -c .jsdoc.json" ,
19
19
"i18n:src" : " mkdirp translations/core && format-message extract --out-file translations/core/en.json src/extensions/**/index.js" ,
20
20
"i18n:push" : " tx-push-src scratch-editor extensions translations/core/en.json" ,
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
2
extends : 'scratch-semantic-release-config' ,
3
- branches : 'develop'
3
+ branches : [
4
+ {
5
+ name : 'develop'
6
+ // default channel
7
+ } ,
8
+ {
9
+ name : 'hotfix/*' ,
10
+ channel : 'hotfix'
11
+ }
12
+ ]
4
13
} ;
You can’t perform that action at this time.
0 commit comments