File tree Expand file tree Collapse file tree 2 files changed +44
-7
lines changed Expand file tree Collapse file tree 2 files changed +44
-7
lines changed Original file line number Diff line number Diff line change @@ -100,16 +100,35 @@ jobs:
100
100
- ./package.json
101
101
# - jobstatus
102
102
103
- publish :
103
+ pact-publish-dev :
104
+ executor : build-executor
105
+ steps :
106
+ - checkout
107
+ - setup_environment
108
+ - node/install-packages
109
+ - run :
110
+ name : Publish development pacts to broker
111
+ command : npm run pact:publish-dev
112
+ # - jobstatus
113
+
114
+ pact-publish-prod :
115
+ executor : build-executor
116
+ steps :
117
+ - checkout
118
+ - setup_environment
119
+ - node/install-packages
120
+ - run :
121
+ name : Publish production pacts to broker
122
+ command : npm run pact:publish-prod
123
+ # - jobstatus
124
+
125
+ npm-publish :
104
126
executor : build-executor
105
127
steps :
106
128
- attach_workspace :
107
129
at : /tmp/workspace
108
130
- setup_environment :
109
131
version_path : /tmp/workspace
110
- - run :
111
- name : Publish pacts to broker
112
- command : npm run pact:publish
113
132
- run :
114
133
name : Publish package to NPM
115
134
command : cd /tmp/workspace && npm publish
@@ -134,7 +153,16 @@ workflows:
134
153
build-and-deploy :
135
154
jobs :
136
155
- build_test
137
- - publish :
156
+ - pact-publish-dev :
157
+ context :
158
+ - org-global
159
+ - w3w-pact
160
+ requires :
161
+ - build_test
162
+ filters :
163
+ branches :
164
+ ignore : master
165
+ - pact-publish-prod :
138
166
context :
139
167
- org-global
140
168
- w3w-pact
@@ -143,7 +171,15 @@ workflows:
143
171
filters :
144
172
branches :
145
173
only : master
174
+ - npm-publish :
175
+ context :
176
+ - org-global
177
+ requires :
178
+ - build_test
179
+ filters :
180
+ branches :
181
+ only : master
146
182
- tag :
147
183
requires :
148
- - publish
184
+ - npm- publish
149
185
Original file line number Diff line number Diff line change 20
20
"pact_do_not_track" : true
21
21
},
22
22
"scripts" : {
23
- "pact:publish" : " pact-broker publish pacts --consumer-app-version=\" $npm_package_version-$(git rev-parse --short HEAD)\" --auto-detect-version-properties --broker-base-url=${PACT_BROKER_BASE_URL}" ,
23
+ "pact:publish-dev" : " pact-broker publish pacts --consumer-app-version=\" $npm_package_version-$(git rev-parse --short HEAD)\" --auto-detect-version-properties --broker-base-url=${PACT_BROKER_BASE_URL}" ,
24
+ "pact:publish-prod" : " pact-broker publish pacts --consumer-app-version=\" $npm_package_version\" --auto-detect-version-properties --broker-base-url=${PACT_BROKER_BASE_URL}" ,
24
25
"test" : " jest" ,
25
26
"test:watch" : " jest --watch" ,
26
27
"coverage" : " jest --coverage" ,
You can’t perform that action at this time.
0 commit comments