Skip to content

release

release #28

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
release:
name: release
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
settings-path: ${{ github.workspace }}
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Setup SSH
uses: webfactory/ssh-agent@v0.6.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# IMPORTANT: releasing to Maven Central requires sources, javadoc,
# in addition to binary artifacts, and everything must be GPG signed.
# Hence, we cannot run this with mode-build-fast profile.
- name: Maven release prepare and perform
run: |
git config --global user.name "Adrian Herscu"
git config --global user.email "adrian.herscu@gmail.com"
chmod +x mvnw && ./mvnw release:prepare release:perform \
-s $GITHUB_WORKSPACE/settings.xml \
-Pmode-build-quiet
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
# ISSUE: this requires running from a tag, and the tag created
# by maven-release-plugin is committed with [skip ci], hence
# will not trigger a CI event...
# Disabling meanwhile since releases are pushed to Maven Central anyway.
# - uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: "${{ github.workspace }}/**/target/*.jar"