Skip to content

Publish libappindicator-gtk3-java-full to Maven Central #22

Publish libappindicator-gtk3-java-full to Maven Central

Publish libappindicator-gtk3-java-full to Maven Central #22

Workflow file for this run

name: Publish libappindicator-gtk3-java-full to Maven Central
on:
release:
types: [published]
defaults:
run:
shell: bash
jobs:
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions
steps:
- uses: actions/checkout@v4
with:
ref: 'develop'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 22
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Enforce project version ${{ github.event.release.tag_name }}
run: mvn versions:set -B -DnewVersion="${{ github.event.release.tag_name }}"
- name: Deploy
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
env:
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}