prepare-release #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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 "[email protected]" | |
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 |