diff --git a/VERSION b/VERSION index 49b07884e1..984c3f31ee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -beta.8 +0.1.0-beta.9 diff --git a/ci/Jenkinsfile.combined b/ci/Jenkinsfile.combined index 51300599da..ef006b2790 100644 --- a/ci/Jenkinsfile.combined +++ b/ci/Jenkinsfile.combined @@ -1,4 +1,4 @@ -library 'status-react-jenkins@v1.2.11' +library 'status-jenkins-lib@v1.2.12' pipeline { agent { label 'linux' } @@ -16,6 +16,14 @@ pipeline { )) } + parameters { + booleanParam( + name: 'PUBLISH', + description: 'Trigger publishing of build results to GitHub.', + defaultValue: getPublishDefault(params.PUBLISH), + ) + } + stages { stage('Build') { parallel { @@ -59,5 +67,21 @@ pipeline { jenkins.setBuildDesc(urls) } } } + stage('Publish') { + when { expression { params.PUBLISH } } + steps { script { + github.publishReleaseFiles(repo: 'status-desktop'); + } } + } } } + +/* Helper that makes PUBLISH default to 'false' unless: + * - The build is for a release branch + * - A user explicitly specified a value + * Since release builds create and re-create GitHub drafts every time. */ +def Boolean getPublishDefault(Boolean previousValue) { + if (env.JOB_NAME.startsWith('status-desktop/release')) { return true } + if (previousValue != null) { return previousValue } + return false +} diff --git a/ci/Jenkinsfile.linux b/ci/Jenkinsfile.linux index bc2f4c9f35..ad2b7b756c 100644 --- a/ci/Jenkinsfile.linux +++ b/ci/Jenkinsfile.linux @@ -1,4 +1,4 @@ -library 'status-react-jenkins@v1.2.11' +library 'status-jenkins-lib@v1.2.12' pipeline { agent { diff --git a/ci/Jenkinsfile.macos b/ci/Jenkinsfile.macos index 4ef7e78ebf..990f715760 100644 --- a/ci/Jenkinsfile.macos +++ b/ci/Jenkinsfile.macos @@ -1,4 +1,4 @@ -library 'status-react-jenkins@v1.2.11' +library 'status-jenkins-lib@v1.2.12' pipeline { agent { diff --git a/ci/Jenkinsfile.windows b/ci/Jenkinsfile.windows index c8eda2ba1a..1ef8617fef 100644 --- a/ci/Jenkinsfile.windows +++ b/ci/Jenkinsfile.windows @@ -1,4 +1,4 @@ -library 'status-react-jenkins@v1.2.11' +library 'status-jenkins-lib@v1.2.12' pipeline { agent { label 'windows' }