Skip to content

Release

Release #15

Workflow file for this run

name: Release
on: workflow_dispatch
jobs:
# build:
# name: Test with Java ${{ matrix.jdk }}
# runs-on: ubuntu-22.04
# strategy:
# fail-fast: false
# matrix:
# jdk: ['8', '11', '17', '21']
#
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK ${{ matrix.jdk }}
# uses: actions/setup-java@v4
# with:
# distribution: temurin
# java-version: ${{ matrix.jdk }}
# cache: 'maven'
#
# - name: Build with Maven
# run: mvn -B package --file pom.xml
deploy:
name: Deploy Artifact
# needs: build
# continue-on-error: true
# if: ${{ needs.build.result == 'success' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 7
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 7
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
# - name: Maven Deploy (GitHub Packages)
# run: mvn deploy -Prelease,githubPackages -DskipTests=true
# with:
# server-id: github
# env:
# GITHUB_TOKEN: ${{ github.token }}
- name: Maven Deploy (Maven Central)
run: mvn deploy -X -Prelease -DskipTests=true
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}