Skip to content

Build & Release

Build & Release #9

Workflow file for this run

name: "Build & Release"
defaults:
run:
shell: bash
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Import GPG signing key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.MAVEN_SIGNING_KEY }}
passphrase: ${{ secrets.MAVEN_SIGNING_KEY_PASSPHRASE }}
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
server-id: central
server-username: MVN_CENTRAL_USERNAME
server-password: MVN_CENTRAL_PASSWORD
- name: Release to Maven repo
run: |
mvn -Dgpg.keyname=${{ secrets.GPG_KEY_NAME }} -Dgpg.passphrase=${{ secrets.MAVEN_SIGNING_KEY_PASSPHRASE }} \
deploy
env:
MVN_CENTRAL_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }}
MVN_CENTRAL_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}