Skip to content

commit

commit #11

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Maven Snapshot
on:
push:
branches: [ develop, master ]
jobs:
build:
runs-on: ubuntu-latest
environment: deploy
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-package: 'jdk'
java-version: '11'
server-id: 'alex9849-nexus'
server-username: NEXUS_USERNAME
server-password: NEXUS_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_PGP_SECRET_KEY }}
gpg-passphrase: MAVEN_PGP_PASSPHRASE
- name: Publish to Nexus
env:
MAVEN_PGP_PASSPHRASE: ${{ secrets.MAVEN_PGP_PASSPHRASE }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: mvn --no-transfer-progress --batch-mode clean deploy -P release