From cdc16139c9d3ba87901678d14d757759bc7a8b03 Mon Sep 17 00:00:00 2001 From: Grace Grimwood Date: Tue, 5 Dec 2023 15:08:16 +1300 Subject: [PATCH] added GitHub release creation to release script (with attached binary distribution), update changelog with recent changes --- CHANGELOG.md | 5 +++++ scripts/release.sh | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e4ee5a451..eddcab3cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,17 @@ Please enumerate **all user-facing** changes using format ` /dev/null +then + echo "gh command could not be found. Please create a release by hand https://github.com/kroxylicious/kroxylicious/releases/new" +else + echo "Creating GitHub release with binary distribution" + ORIGINAL_GH_DEFAULT_REPO=$(gh repo set-default -v | (grep -v 'no default repository' || true)) + gh repo set-default $(git remote get-url ${REPOSITORY}) + # create GitHub release via CLI https://cli.github.com/manual/gh_release_create + if [[ "${DRY_RUN:-false}" == true ]]; then + gh release create "${RELEASE_TAG}" ./kroxylicious-*/target/kroxylicious-*-bin.* --title "${RELEASE_TAG}" --notes-file "CHANGELOG.md" --draft + echo "Draft release created. This must be manually published." + else + gh release create "${RELEASE_TAG}" ./kroxylicious-*/target/kroxylicious-*-bin.* --title "${RELEASE_TAG}" --notes-file "CHANGELOG.md" + fi +fi + PREPARE_DEVELOPMENT_BRANCH="prepare-development-${RELEASE_DATE}" git checkout -b ${PREPARE_DEVELOPMENT_BRANCH} ${TEMPORARY_RELEASE_BRANCH} mvn versions:set -DnextSnapshot=true -DnextSnapshotIndexToIncrement="${SNAPSHOT_INCREMENT_INDEX}" -DgenerateBackupPoms=false -DprocessAllModules=true