Publish OntoUML4j to the Maven Central Repository #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish OntoUML4j to the Maven Central Repository | |
on: | |
release: | |
types: [ created ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Import GPG Key and Cache Passphrase | |
run: | | |
export GPG_TTY=$(tty) | |
echo "${{ secrets.GPG_SIGNING_KEY }}" | base64 --decode | gpg --batch --import | |
gpg --list-secret-keys --keyid-format LONG | |
echo "${{ secrets.GPG_PASSWORD }}" | gpg-connect-agent --batch "PRECACHE ${{ secrets.GPG_KEY_ID }}" "S CACHE_INCAPS" /bye | |
gpg-connect-agent updatestartuptty /bye | |
env: | |
GPG_TTY: $(tty) | |
- name: Publish package | |
run: | | |
mvn clean deploy -P release -Dgpg.keyname=${{ secrets.GPG_KEY_ID }} | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | |