Skip to content

Create Maven Release #3

Create Maven Release

Create Maven Release #3

name: Create Maven Release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Release Version:"
required: true
developmentVersion:
description: "Next Development Version:"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# with:
# token: ${{ github.token }}
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Configure Git User
run: |
git config user.email ${{ github.actor }}@users.noreply.github.com
git config user.name ${{ github.actor }}
- name: Prepare Release
run: mvn -B release:prepare -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ github.token }}
- name: Push Release
run: |
git push
git push --tags