From d43c0822f4707bb5a2bb53378704497610302d0a Mon Sep 17 00:00:00 2001 From: Elliott Baron Date: Tue, 14 May 2024 18:10:41 -0400 Subject: [PATCH] ci(maven): use script for releasing snapshots (#397) --- .github/workflows/push-ci.yml | 2 +- release-snapshot.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 release-snapshot.sh diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index ff6c7708..e2213adc 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -33,5 +33,5 @@ jobs: uses: ./.github/workflows/maven-central-publish.yml secrets: inherit with: - publish-cmd: './mvnw -Prelease deploy jreleaser:deploy' + publish-cmd: './release-snapshot.sh' if: ${{ github.repository_owner == 'cryostatio' && endsWith(needs.get-version.outputs.project-version, '-SNAPSHOT') }} diff --git a/release-snapshot.sh b/release-snapshot.sh new file mode 100755 index 00000000..25a630b5 --- /dev/null +++ b/release-snapshot.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +echo "📦 Staging artifacts..." +./mvnw --batch-mode --no-transfer-progress -Ppublication -DskipTests=true -Dskip.spotless=true + +echo "🚀 Releasing..." +./mvnw --batch-mode --no-transfer-progress -Prelease jreleaser:deploy + +echo "🎉 Done!"