Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
description: 'target-tag: tag or branch name to release. Use to re-release failed releases'
default: master

release-version:
type: string
description: 'release-version: version to release (e.g. 0.14.0.0). Defaults to current SNAPSHOT version without the -SNAPSHOT suffix.'
default: ''

jobs:
release:
name: Release
Expand Down Expand Up @@ -69,6 +74,8 @@ jobs:
- name: Prepare release
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
SKIP_TESTS: ${{ inputs.skip-tests }}
RELEASE_VERSION: ${{ inputs.release-version }}
run: |
make release-prepare

Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ DRY_RUN ?= true
SKIP_TESTS ?= false
GITHUB_STEP_SUMMARY ?=

RELEASE_VERSION ?=

#ifeq ($(shell if [[ -n "$${GITHUB_STEP_SUMMARY}" ]]; then echo "running-in-workflow"; else echo "running-in-shell"; fi), running-in-workflow)
# DEBUG = true
#endif
Expand All @@ -22,6 +24,11 @@ ifneq (${SKIP_TESTS},false)
_RELEASE_SKIP_TESTS= -DskipTests=true -DskipITs=true
endif

_RELEASE_VERSION_FLAG ?=
ifneq (${RELEASE_VERSION},)
_RELEASE_VERSION_FLAG= -DreleaseVersion=${RELEASE_VERSION}
endif

ifeq (${DEBUG},false)
MVNCMD ?= mvn
else
Expand All @@ -47,7 +54,8 @@ ifeq ($(shell if [[ -n "$${GPG_PASSPHRASE}" ]]; then echo "present"; else echo "
@echo "environment variable GPG_PASSPHRASE has to be set"
@exit 1
endif
MAVEN_OPTS="$${MAVEN_OPTS}$(_RELEASE_SKIP_TESTS)" $(MVNCMD) release:prepare -Drelease.push.changes=false -Dgpg.passphrase=$${GPG_PASSPHRASE}
MAVEN_OPTS="$${MAVEN_OPTS}$(_RELEASE_SKIP_TESTS)" $(MVNCMD) release:prepare -Drelease.push.changes=false \
-Dgpg.passphrase="$${GPG_PASSPHRASE}" $(_RELEASE_VERSION_FLAG)

.release:
ifeq ($(shell if [[ -n "$${GPG_PASSPHRASE}" ]]; then echo "present"; else echo "absent"; fi), absent)
Expand Down
Loading