@@ -169,6 +169,8 @@ build:macos:
169
169
- if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
170
170
- if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
171
171
172
+ # TODO gh prelease with the native addon builds
173
+ # TODO: THIS IS A LIBRARY PRERELEASE
172
174
build:prerelease :
173
175
stage : build
174
176
needs :
@@ -188,7 +190,7 @@ build:prerelease:
188
190
after_script :
189
191
- rm -f ./.npmrc
190
192
rules :
191
- # Only prerelease tag
193
+ # Only npm prerelease tags
192
194
- if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+-.*[0-9]+$/
193
195
194
196
integration:builds :
@@ -224,8 +226,16 @@ integration:builds:
224
226
paths :
225
227
- ./builds/
226
228
rules :
227
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
228
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
229
+ - if : $CI_COMMIT_BRANCH == 'staging'
230
+
231
+ integration:deployment :
232
+ stage : integration
233
+ needs :
234
+ - integration:builds
235
+ script :
236
+ - echo 'Perform service deployment for integration testing'
237
+ rules :
238
+ - if : $CI_COMMIT_BRANCH == 'staging'
229
239
230
240
integration:nix :
231
241
stage : integration
@@ -240,8 +250,7 @@ integration:nix:
240
250
)"
241
251
- $build_application/bin/typescript-demo-lib
242
252
rules :
243
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
244
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
253
+ - if : $CI_COMMIT_BRANCH == 'staging'
245
254
246
255
integration:docker :
247
256
stage : integration
@@ -258,8 +267,7 @@ integration:docker:
258
267
- image="$(docker load --input ./builds/*docker* | cut -d' ' -f3)"
259
268
- docker run "$image"
260
269
rules :
261
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
262
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
270
+ - if : $CI_COMMIT_BRANCH == 'staging'
263
271
264
272
integration:linux :
265
273
stage : integration
@@ -269,8 +277,7 @@ integration:linux:
269
277
script :
270
278
- for f in ./builds/*-linux-*; do "$f"; done
271
279
rules :
272
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
273
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
280
+ - if : $CI_COMMIT_BRANCH == 'staging'
274
281
275
282
integration:windows :
276
283
stage : integration
@@ -281,8 +288,7 @@ integration:windows:
281
288
script :
282
289
- Get-ChildItem -File ./builds/*-win-* | ForEach {& $_.FullName}
283
290
rules :
284
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
285
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
291
+ - if : $CI_COMMIT_BRANCH == 'staging'
286
292
287
293
integration:macos :
288
294
stage : integration
@@ -294,8 +300,94 @@ integration:macos:
294
300
script :
295
301
- for f in ./builds/*-macos-x64*; do "$f"; done
296
302
rules :
297
- - if : $CI_COMMIT_BRANCH == 'staging' && $CI_COMMIT_TITLE !~ /^[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
298
- - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+(?:-.*[0-9]+)?$/
303
+ - if : $CI_COMMIT_BRANCH == 'staging'
304
+
305
+ # This produces the GH release page with the application builds
306
+ # MERGE with the LIBRARY prerelease, since it's all together now
307
+ integration:prerelease :
308
+ stage : integration
309
+ needs :
310
+ - integration:builds
311
+ - integration:nix
312
+ - integration:docker
313
+ - integration:linux
314
+ - integration:windows
315
+ - integration:macos
316
+ # Don't interrupt publishing job
317
+ interruptible : false
318
+ allow_failure : true
319
+ script :
320
+ - echo "Use gh to add application binaries to the GH release"
321
+ rules :
322
+ - if : $CI_COMMIT_BRANCH == 'staging'
323
+
324
+ integration:merge :
325
+ stage : integration
326
+ needs :
327
+ - integration:nix
328
+ - integration:docker
329
+ - integration:linux
330
+ - integration:windows
331
+ - integration:macos
332
+ script :
333
+ - echo 'use gh to create and merge PR from staging to master'
334
+ rules :
335
+ - if : $CI_COMMIT_BRANCH == 'staging'
336
+
337
+ # the expectation is that you must have merged into master from staging to trigger this
338
+ # if you directly push to master, you corrupt this entire process
339
+ # because this will end up acquiring it from the latest builds from the same path
340
+ # thus we prevent master branch, direct merging into master branch
341
+
342
+ release:deployment :
343
+ stage : release
344
+ needs :
345
+ - project : $CI_PROJECT_PATH
346
+ job : integration:builds
347
+ ref : staging
348
+ artifacts : true
349
+ script :
350
+ - echo 'Perform service deployment for production release'
351
+ rules :
352
+ - if : $CI_COMMIT_BRANCH == 'master'
353
+
354
+ # TODO: use gh to produce the final release tag and page with all binaries
355
+ # TODO: use npm to produce the final npm erlease too
356
+ release:distribution :
357
+ stage : release
358
+ needs :
359
+ - release:deployment
360
+ - project : $CI_PROJECT_PATH
361
+ job : build:linux
362
+ ref : staging
363
+ artifacts : true
364
+ - project : $CI_PROJECT_PATH
365
+ job : build:windows
366
+ ref : staging
367
+ artifacts : true
368
+ - project : $CI_PROJECT_PATH
369
+ job : build:macos
370
+ ref : staging
371
+ artifacts : true
372
+ - project : $CI_PROJECT_PATH
373
+ job : integration:builds
374
+ ref : staging
375
+ artifacts : true
376
+ # Don't interrupt publishing job
377
+ interruptible : false
378
+ allow_failure : true
379
+ before_script :
380
+ - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ./.npmrc
381
+ script :
382
+ - >
383
+ nix-shell --run '
384
+ npm publish --access public;
385
+ '
386
+ after_script :
387
+ - rm -f ./.npmrc
388
+ rules :
389
+ # Only npm release tags
390
+ - if : $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/
299
391
300
392
# packages:
301
393
# stage: release
0 commit comments