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 libayatana-appindicator-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: 'libayatana-appindicator-full' | |
- 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 }} |