Skip to content

📦 Publish to Maven Central #176

📦 Publish to Maven Central

📦 Publish to Maven Central #176

Workflow file for this run

name: 📦 Publish to Maven Central
on:
workflow_dispatch:
jobs:
publish-to-maven-central:
runs-on: ubuntu-latest
if: "github.event_name == 'workflow_dispatch'"
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '18'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: 📦 Publish package
run: "./mvnw clean deploy --batch-mode -DskipTests -Pci-cd -pl calculation"
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_GPG_PASSPHRASE }}