Skip to content

Manual Maven Deploy Package #7

Manual Maven Deploy Package

Manual Maven Deploy Package #7

Workflow file for this run

name: Manual Maven Deploy Package
on:
workflow_dispatch:
inputs:
VERSION:
description: 'New Version number'
required: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
artifact_name: nats-embedded
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8 for deploy to OSSRH
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Update package version
run: mvn versions:set -DnewVersion=${{ github.event.inputs.VERSION }}
- name: Publish to Apache Maven Central
run: mvn deploy -PmavenRelease
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Set up JDK 8 for deploy to github packages
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
server-id: github
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -PgithubRelease
env:
GITHUB_TOKEN: ${{ secrets.NATS_GITHUB_TOKEN }}