Skip to content

Remove the node part (#45) #7

Remove the node part (#45)

Remove the node part (#45) #7

Workflow file for this run

name: Publish the Java Package to Maven Central Repository
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: java
steps:
- uses: actions/checkout@v2
- name: Set version
id: version
run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/v##g")
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Upload the package to Maven Central Repository
run: |
echo "${{ secrets.SIGNING_SECRET_KEY_RING }}" | base64 -d > ~/.gradle/secring.gpg
./gradlew publish \
-Pversion="${{ steps.version.outputs.version }}" \
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}" \
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}" \
-Psigning.secretKeyRingFile="$(echo ~/.gradle/secring.gpg)" \
-PossrhUsername="${{ secrets.OSSRH_USERNAMAE }}" \
-PossrhPassword="${{ secrets.OSSRH_PASSWORD }}"