Skip to content

Publish to Maven Central #15

Publish to Maven Central

Publish to Maven Central #15

Workflow file for this run

name: Publish to Maven Central
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582
# - name: Configure GPG Key
# run: |
# echo -n "$GPG_SIGNING_KEY_BASE64" | base64 --decode | gpg --import
# env:
# GPG_SIGNING_KEY_BASE64: ${{ secrets.GPG_SIGNING_KEY_BASE64 }}
# - name: Make build script executable
# run: chmod +x ./build-lib.sh
- name: Build and Publish
env:
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_FULL_SIGNING_KEY: ${{ secrets.GPG_FULL_SIGNING_KEY }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN_2 }}
SELECTED_LIBRARIES: "hyperswitch-gradle-plugin,plugin"
run: ./build-lib.sh
# - name: Upload to Maven Central
# env:
# SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
# run: ./upload-lib.sh