Skip to content

Release 2.14.5: Security fixes and dependency upgrades #53

Release 2.14.5: Security fixes and dependency upgrades

Release 2.14.5: Security fixes and dependency upgrades #53

Workflow file for this run

name: Release 2.x
on:
push:
branches:
- 2.14.5
workflow_dispatch:
inputs:
snapshot:
description: 'Deploy SNAPSHOT'
type: boolean
default: false
permissions:
contents: read
jobs:
deploy:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'corretto'
java-version: '8'
- name: Validate SNAPSHOT version
if: inputs.snapshot == true
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ "$VERSION" != *-SNAPSHOT ]]; then
echo "::error::Version $VERSION is not a SNAPSHOT version"
exit 1
fi
- name: Remove old Maven Settings
run: rm -f /home/runner/.m2/settings.xml
- name: Maven Settings
uses: s4u/maven-settings-action@v4.0.0
with:
servers: |
[{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_PASSWORD }}"
},
{
"id": "ossrh",
"username": "${{ secrets.OSSRH_USERNAME }}",
"password": "${{ secrets.OSSRH_PASSWORD }}"
}]
- name: Import GPG
uses: crazy-max/ghaction-import-gpg@v7.0.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Deploy
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: mvn -B -ntp deploy -DskipTests -Dgpg.keyname=${GPG_KEY_NAME} -Dgpg.passphrase=${GPG_PASSPHRASE}