Skip to content

Publish package to the Maven Central Repository #6

Publish package to the Maven Central Repository

Publish package to the Maven Central Repository #6

Workflow file for this run

name: Publish package to the Maven Central Repository
on: workflow_dispatch
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Clojure tools
uses: DeLaGuardo/[email protected]
with:
lein: 'latest'
- name: "Build JAR files"
run: lein uberjar
- name: "Generate pom.xml"
run: lein pom
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn --batch-mode -Dsource=11 -Dtarget=11 -Dmaven.compiler.source=11 -Dmaven.compiler.target=11 deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}