Skip to content

release

release #26

Workflow file for this run

# See:
# https://docs.github.com/en/free-pro-team@latest/actions/guides/publishing-java-packages-with-maven
# https://central.sonatype.org/pages/apache-maven.html
# https://github.com/actions/setup-java
name: release
on:
workflow_dispatch:
jobs:
release:
environment: maven_central
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up Maven Central repository
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
server-id: ossrh
server-username: MAVEN_USERNAME # env variable to use for username in release
server-password: MAVEN_PASSWORD # env variable to use for password in release
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable to use for passphrase in release
- name: Set up Git user
run: |
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
- name: Release
run: |
mvn -B -Dusername=${{ secrets.GH_USERNAME }} -Dpassword=${{ secrets.GH_ACCESS_TOKEN }} release:prepare
mvn -B release:perform
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}