Chore: create github release for tagged commits
@@ -43,7 +43,7 @@ pipeline {
sh 'cp target/release/btc-parachain target/release/btc-parachain-standalone'
archiveArtifacts 'target/release/btc-parachain-standalone'
- stash(name: "build-standalone", includes: 'Dockerfile_release, target/release/btc-parachain')
+ stash(name: 'build-standalone', includes: 'Dockerfile_release, target/release/btc-parachain')
sh '/usr/local/bin/sccache -s'
}
@@ -59,7 +59,7 @@ pipeline {
sh 'cargo build --manifest-path parachain/Cargo.toml --release --no-default-features --features cumulus-polkadot'
archiveArtifacts 'target/release/btc-parachain'
- stash(name: "build-parachain", includes: 'Dockerfile_release, target/release/btc-parachain')
+ stash(name: 'build-parachain', includes: 'Dockerfile_release, target/release/btc-parachain')
sh '/usr/local/bin/sccache -s'
}
@@ -84,7 +84,7 @@ pipeline {
steps {
container(name: 'kaniko', shell: '/busybox/sh') {
dir('unstash') {
- unstash("build-standalone")
+ unstash('build-standalone')
runKaniko()
}
}
@@ -108,12 +108,31 @@ pipeline {
steps {
container(name: 'kaniko', shell: '/busybox/sh') {
dir('unstash') {
- unstash("build-parachain")
+ unstash('build-parachain')
runKaniko()
}
}
}
}
+
+ stage('Create GitHub release') {
+ when {
+ anyOf {
+ tag '*'
+ }
+ }
+ steps {
+ sh '''
+ wget -q -O - https://github.com/cli/cli/releases/download/v1.6.2/gh_1.6.2_linux_amd64.tar.gz | tar xzf -
+ ./gh_1.6.2_linux_amd64/bin/gh auth status
+ wget -q -O - https://github.com/git-chglog/git-chglog/releases/download/v0.10.0/git-chglog_0.10.0_linux_amd64.tar.gz | tar xzf -
+ #export PREV_TAG=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)
+ #export TAG_NAME=$(git describe --abbrev=0 --tags `git rev-list --tags --skip=0 --max-count=1`)
+ ./git-chglog --output CHANGELOG.md $TAG_NAME
+ '''
+ sh 'gh release -R $GIT_URL create $TAG_NAME --title $TAG_NAME -F CHANGELOG.md -d ' + output_files.collect { "target/release/$it" }.join(' ')
+ }
+ }
}
}
