File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ DEB_PKG_NAME = 'github-backup-utils'
34
34
GH_BASE_BRANCH = ENV [ 'GH_BASE_BRANCH' ] || 'master' # TODO: should we even allow a default or require all params get set explicitly?
35
35
GH_STABLE_BRANCH = ""
36
36
37
+ # If PUBLISH is false, we leave the release in a draft state to be manually published later through the UI
38
+ PUBLISH = ENV [ 'PUBLISH' ] == 'true' || false
39
+
37
40
CHANGELOG_TMPL = '' '<%= package_name %> (<%= package_version %>) UNRELEASED; urgency=medium
38
41
39
42
<%- changes.each do |ch| -%>
@@ -480,15 +483,21 @@ if $PROGRAM_NAME == __FILE__
480
483
attach_assets_to_release res [ 'upload_url' ] , res [ 'id' ] , [ "#{ base_dir } /dist/#{ DEB_PKG_NAME } -v#{ version } .tar.gz" ]
481
484
attach_assets_to_release res [ 'upload_url' ] , res [ 'id' ] , [ "#{ base_dir } /dist/#{ DEB_PKG_NAME } _#{ version } _all.deb" ]
482
485
483
- puts 'Publishing release...'
484
- publish_release res [ 'id' ]
486
+ if PUBLISH
487
+ puts 'Publishing release...'
488
+ publish_release res [ 'id' ]
489
+ end
485
490
486
491
puts 'Cleaning up...'
487
492
clean_up version
488
493
489
494
puts "Updating #{ GH_STABLE_BRANCH } branch..."
490
495
update_stable_branch
491
496
497
+ if !PUBLISH
498
+ puts 'Release left in a "Draft" state. Go to the https://github.com/github/backup-utils/releases and publish when ready.'
499
+ end
500
+
492
501
puts 'Released!'
493
502
rescue RuntimeError => e
494
503
$stderr. puts "Error: #{ e } "
You can’t perform that action at this time.
0 commit comments