File tree Expand file tree Collapse file tree 4 files changed +35
-6
lines changed Expand file tree Collapse file tree 4 files changed +35
-6
lines changed Original file line number Diff line number Diff line change 49
49
- checkout
50
50
- restore_node_modules
51
51
- run : npm run build
52
+ - save_cache :
53
+ key : dist-{{ .Environment.CIRCLE_SHA1 }}
54
+ paths :
55
+ - packages/codegen-ui/dist
56
+ - packages/codegen-ui-react/dist
57
+ - packages/test-generator/dist
52
58
53
59
unit-test :
54
60
docker :
@@ -70,16 +76,15 @@ jobs:
70
76
steps :
71
77
- checkout
72
78
- restore_node_modules
79
+ - restore_cache :
80
+ keys :
81
+ - dist-{{ .Environment.CIRCLE_SHA1 }}
73
82
- run :
74
83
name : NPM Login
75
84
command : npm set "//registry.npmjs.org/:_authToken" $NPM_ACCESS_TOKEN
76
85
- run :
77
86
name : NPM Publish
78
- command : >-
79
- if [[ `git log --format=%s -n 1` =~ ^chore\(release\):\ v.* ]];
80
- then npx lerna publish from-git -y;
81
- else npx lerna publish --pre-dist-tag next --canary -y;
82
- fi
87
+ command : bash ./.circleci/publish.sh
83
88
84
89
workflows :
85
90
build :
@@ -104,6 +109,7 @@ workflows:
104
109
only :
105
110
- main
106
111
- develop
112
+ - /tagged-release\/.*/
107
113
108
114
commands :
109
115
create_concatenated_package_lock :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+
3
+ if [[ ` git log --format=%s -n 1` =~ ^chore\( release\) :\ v.* ]]; then
4
+ # production release
5
+ npx lerna publish from-git --ignore-scripts -y;
6
+ else
7
+ # pre-release or tagged release
8
+ # if branch starts with tagged-release/ then do tagged release, else pre-release
9
+ npx lerna publish --canary --ignore-scripts -y \
10
+ --preid $( [[ $CIRCLE_BRANCH =~ ^tagged-release\/ .* ]] \
11
+ && echo $( echo $CIRCLE_BRANCH | sed ' s:.*/::' ) --no-pre-dist-tag \
12
+ || echo alpha --pre-dist-tag next) ;
13
+ fi
Original file line number Diff line number Diff line change @@ -149,6 +149,17 @@ npm install @aws-amplify/codegen-ui-react@next
149
149
150
150
See [ lerna publish docs] ( https://github.com/lerna/lerna/tree/main/commands/publish ) for further detail.
151
151
152
+ ### Tagged Release
153
+
154
+ A tagged release is used to release emergent or prototype changes without merging into ` main ` .
155
+ To create a tagged release create a pull request or push directly to a branch with the prefix ` tagged-release/ ` .
156
+ (Ex. ` tagged-release/fix-properties ` ).
157
+ The branch name must not contain any additional forward slashes after ` tagged-release/ ` .
158
+ The tagged release will use the same versioning process as the pre-release except:
159
+
160
+ - the preid will be the branch name with ` tagged-release/ ` removed. (Ex. ` 1.1.1-fix-properties.270+2baaca9 ` )
161
+ - the release will not be published under any dist tag
162
+
152
163
### Icons
153
164
154
165
The built-in iconset is genereted with ` packages/scripts/generateBuiltInIconset.js ` .
Original file line number Diff line number Diff line change 10
10
"test" : " lerna run test --stream" ,
11
11
"test:update" : " lerna run test:update --stream" ,
12
12
"build" : " lerna run build --stream" ,
13
- "prepublishOnly" : " npm run build && npm run test" ,
14
13
"setup-dev" : " npm install && lerna bootstrap && lerna run build" ,
15
14
"clean" : " lerna run clean && lerna exec npm run rimraf tsconfig.tsbuildinfo && lerna clean --yes && npm run rimraf node_modules" ,
16
15
"prepare" : " husky install" ,
You can’t perform that action at this time.
0 commit comments