Skip to content

Merge pull request #302 from WDAqua/dependabot/npm_and_yarn/qanary-co… #687

Merge pull request #302 from WDAqua/dependabot/npm_and_yarn/qanary-co…

Merge pull request #302 from WDAqua/dependabot/npm_and_yarn/qanary-co… #687

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ master ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository # Configures settings.xml with required credentials
uses: actions/setup-java@v4
with: # The environment variables are defined when needed (here, when the package is being published)
distribution: 'temurin'
java-version: '17'
server-id: 'ossrh'
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Install xmllint
run: sudo apt-get update && sudo apt-get install -y libxml2-utils
- name: Determine release list
run: bash -c ./service_config/version_check.sh
- name: Install dependencies
run: mvn clean install -Dgpg.skip
- name: Deploy and Release artifact
run: |
if [ -z ${{ env.ARTIFACTS_TO_BE_RELEASED}} ]; then
echo "No artifacts to be released."
else
echo "Releasing artifacts: ${{ env.ARTIFACTS_TO_BE_RELEASED }}"
mvn clean deploy -Dgpg.keyname=${{ secrets.MAVEN_GPG_KEYNAME }} -pl ${{ env.ARTIFACTS_TO_BE_RELEASED }}
fi
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}