Skip to content

Actions CI fixes

Actions CI fixes #76

Workflow file for this run

name: release-actions
on:
push:
branches:
- '[0-9]+.[0-9x]+.x'
jobs:
ci:
name: publish to maven-central
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Java JDK 11 setup
uses: actions/setup-java@v4
with:
java-version: 11
architecture: x64
distribution: 'zulu'
cache: 'maven'
server-id: ossrh
server-username: NEXUS_USERNAME
server-password: NEXUS_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Remove SNAPSHOT suffix from the project version
run: |
PACKAGE_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
./mvnw versions:set -DnewVersion=${PACKAGE_VERSION%-SNAPSHOT} -DgenerateBackupPoms=false
- name: Publish to Release repository
run: ./mvnw -P release deploy
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}