Skip to content

Deploy to central

Deploy to central #1

Workflow file for this run

name: Deploy to central
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=v0.0.2" >> $GITHUB_ENV
- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'corretto'
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: ${{ secrets.MAVEN_USERNAME }} # env variable for username in deploy
server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} # env variable for token in deploy
- name: Release with Maven
run: mvn -B release:perform -DconnectionUrl=scm:git:${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ env.RELEASE_VERSION }}