Skip to content

Build for Release

Build for Release #5

name: Build for Release
on: workflow_dispatch
permissions:
contents: write
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
jobs:
build-for-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
- name: Setup git config
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Set up JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'corretto'
cache: maven
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
- name: View settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Prepare for release
run: mvn -B release:prepare release:perform --file pom.xml
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6