File tree Expand file tree Collapse file tree 4 files changed +35
-21
lines changed Expand file tree Collapse file tree 4 files changed +35
-21
lines changed Original file line number Diff line number Diff line change @@ -118,13 +118,7 @@ jobs:
118
118
- run :
119
119
name : Publish Amplify Codegen
120
120
command : |
121
- if [ -z "$CIRCLE_PULL_REQUEST" ]; then
122
- git config --global user.email $GITHUB_EMAIL
123
- git config --global user.name $GITHUB_USER
124
- npm run publish:$CIRCLE_BRANCH
125
- else
126
- echo "Skipping deploy."
127
- fi
121
+ bash ./.circleci/publish.sh
128
122
129
123
publish_to_local_registry :
130
124
<< : *defaults
@@ -235,7 +229,7 @@ workflows:
235
229
only :
236
230
- master
237
231
- e2e-testing
238
- - dart-modelgen-null-safety
232
+ - /tagged-release\/.*/
239
233
- e2e-test :
240
234
context :
241
235
- cleanup-resources
@@ -249,7 +243,7 @@ workflows:
249
243
only :
250
244
- master
251
245
- e2e-testing
252
- - dart-modelgen-null-safety
246
+ - /tagged-release\/.*/
253
247
- deploy :
254
248
os : linux_node12
255
249
requires :
@@ -261,7 +255,8 @@ workflows:
261
255
only :
262
256
- release
263
257
- master
264
- - dart-modelgen-null-safety
258
+ - /tagged-release\/.*/
259
+ - /tagged-release-without-e2e-tests\/.*/
265
260
- done_with_node_e2e_tests :
266
261
os : linux_node12
267
262
requires :
Original file line number Diff line number Diff line change @@ -126,13 +126,7 @@ jobs:
126
126
- run :
127
127
name : Publish Amplify Codegen
128
128
command : |
129
- if [ -z "$CIRCLE_PULL_REQUEST" ]; then
130
- git config --global user.email $GITHUB_EMAIL
131
- git config --global user.name $GITHUB_USER
132
- npm run publish:$CIRCLE_BRANCH
133
- else
134
- echo "Skipping deploy."
135
- fi
129
+ bash ./.circleci/publish.sh
136
130
publish_to_local_registry :
137
131
working_directory : ~/repo
138
132
parameters : *ref_0
@@ -420,7 +414,7 @@ workflows:
420
414
only :
421
415
- master
422
416
- e2e-testing
423
- - dart-modelgen-null-safety
417
+ - /tagged-release\/.*/
424
418
- deploy :
425
419
os : linux_node12
426
420
requires :
@@ -432,7 +426,8 @@ workflows:
432
426
only :
433
427
- release
434
428
- master
435
- - dart-modelgen-null-safety
429
+ - /tagged-release\/.*/
430
+ - /tagged-release-without-e2e-tests\/.*/
436
431
- done_with_node_e2e_tests :
437
432
os : linux_node12
438
433
requires :
@@ -471,7 +466,7 @@ workflows:
471
466
only :
472
467
- master
473
468
- e2e-testing
474
- - dart-modelgen-null-safety
469
+ - /tagged-release\/.*/
475
470
- add-codegen-android-e2e-test :
476
471
context : *ref_8
477
472
os : linux_node12
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+ if [ -z " $CIRCLE_PULL_REQUEST " ]; then
3
+ git config --global user.email $GITHUB_EMAIL
4
+ git config --global user.name $GITHUB_USER
5
+ if [[ " $CIRCLE_BRANCH " =~ ^tagged-release ]]; then
6
+ if [[ " $CIRCLE_BRANCH " =~ ^tagged-release-without-e2e-tests\/ .* ]]; then
7
+ # Remove tagged-release-without-e2e-tests/
8
+ export NPM_TAG=" ${CIRCLE_BRANCH/ tagged-release-without-e2e-tests\/ / } "
9
+ elif [[ " $CIRCLE_BRANCH " =~ ^tagged-release\/ .* ]]; then
10
+ # Remove tagged-release/
11
+ export NPM_TAG=" ${CIRCLE_BRANCH/ tagged-release\/ / } "
12
+ fi
13
+ if [ -z " $NPM_TAG " ]; then
14
+ echo " Tag name is missing. Name your branch with either tagged-release/<tag-name> or tagged-release-without-e2e-tests/<tag-name>"
15
+ exit 1
16
+ fi
17
+ echo " Publishing to NPM with tag $NPM_TAG "
18
+ yarn publish:tag
19
+ else
20
+ yarn publish:$CIRCLE_BRANCH
21
+ fi
22
+ else
23
+ echo " Skipping deploy."
24
+ fi
Original file line number Diff line number Diff line change 13
13
"production-build" : " yarn && lerna run build --concurrency 3 --stream" ,
14
14
"publish:master" : " lerna publish --canary --exact --force-publish --preid=dev --dist-tag=dev --include-merged-tags --conventional-prerelease --yes" ,
15
15
"publish:release" : " lerna publish --exact --conventional-commits --message 'chore(release): Publish [ci skip]' --yes" ,
16
- "publish:dart-modelgen-null-safety " : " lerna publish --canary -- exact --force-publish --preid=flutter-preview --dist-tag=flutter-preview --include-merged-tags --conventional-prerelease --yes" ,
16
+ "publish:tag " : " lerna publish --exact --dist-tag=$NPM_TAG --preid=$NPM_TAG --conventional-commits --conventional-prerelease --message 'chore(release): Publish tagged release $NPM_TAG [ci skip]' --no-verify-access --yes" ,
17
17
"postpublish:release" : " git fetch . release:master && git push origin master" ,
18
18
"yarn-use-bash" : " yarn config set script-shell /bin/bash" ,
19
19
"verdaccio-start" : " yarn yarn-use-bash && source .circleci/local_publish_helpers.sh && startLocalRegistry \" $(pwd)/.circleci/verdaccio.yaml\" " ,
You can’t perform that action at this time.
0 commit comments