Skip to content

prepare-release

prepare-release #39

name: prepare-release
on:
workflow_dispatch:
inputs:
release:
description: Type of release
required: true
type: choice
options:
- PATCH
- MINOR
- MAJOR
default: PATCH
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# SSH connection with keys is necessary to allow `git push`
- name: Ensure correct SSH connection
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: actions/setup-java@v3
with:
java-version: 11
distribution: corretto
cache: maven
- name: Determine new versions
run: |
echo "release_version=$(./.github/workflows/maven-version-determiner.py release-version $release_type)" >> "$GITHUB_ENV"
echo "snapshot_version=$(./.github/workflows/maven-version-determiner.py snapshot-version $release_type)" >> "$GITHUB_ENV"
echo "version_tag=$(./.github/workflows/maven-version-determiner.py version-tag $release_type)" >> "$GITHUB_ENV"
env:
release_type: ${{ inputs.release }}
- name: Configure Git user
run: |
git config user.email "actions@users.noreply.github.com"
git config user.name "GitHub Actions"
- name: Prepare with Maven release plugin
run: >
mvn
--batch-mode
-Dresume=false
-Drelease-version=$release_version
-Dtag=$version_tag
-DdevelopmentVersion=$snapshot_version
release:prepare