Skip to content

Merge pull request #10 from PaulSec/main #16

Merge pull request #10 from PaulSec/main

Merge pull request #10 from PaulSec/main #16

Workflow file for this run

name: Continuous integration
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build
id: build
run: |
mvn clean compile
echo current_version=$(echo $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)) >> $GITHUB_OUTPUT
- name: Test
run: mvn test
- name: Publish Test Report
if: always()
uses: mikepenz/action-junit-report@v3
with:
report_paths: 'target/surefire-reports/TEST-*.xml'
- name: Deploy
if: endsWith(steps.build.outputs.current_version, '-SNAPSHOT')
run: mvn -B deploy -DskipTests -Psign
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}