Skip to content

v3.1.176

v3.1.176 #152

Workflow file for this run

name: Publish packages to the Maven Central Repository
on:
workflow_dispatch:
release:
types: [created]
permissions:
contents: read
pull-requests: write
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '8.0.352'
distribution: 'temurin'
cache: 'maven'
server-id: 'central'
server-username: TOKEN_USERNAME
server-password: TOKEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish packages
run: |
token=$(printf "${TOKEN_USERNAME}:${TOKEN_PASSWORD}" | base64)
curl -o /dev/null --fail -X POST "https://central.sonatype.com/api/v1/publisher/deployments/files" -H "Authorization: Bearer ${token}" -H "Content-Type: application/json" --data-raw "{\"sortField\": \"createdTimestamp\"}"
mvn deploy -B -P release -DretryFailedDeploymentCount=10
shell: bash
env:
TOKEN_USERNAME: ${{ secrets.TOKEN_USERNAME }}
TOKEN_PASSWORD: ${{ secrets.TOKEN_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}