Skip to content

chore(deps): bump actions/setup-java from 3 to 4 (#306) #422

chore(deps): bump actions/setup-java from 3 to 4 (#306)

chore(deps): bump actions/setup-java from 3 to 4 (#306) #422

name: workflow-build
on:
push:
branches:
- develop
- release/*
- support/*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
server-id: ossrh # 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
gpg-private-key: ${{ secrets.gpg_private_key }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
MAVEN_USERNAME: ${{ secrets.ossrh_username }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.ossrh_password }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}
run: ./mvnw -B -ntp clean deploy sonar:sonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}