Issue #7: Add unit tests #182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build with JDK 11 on Ubuntu | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven/JDK 11 on Ubuntu | |
run: mvn --batch-mode --file pom.xml clean package | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Java for deployment to Sonatype snapshot repo | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: maven | |
# must match distributionManagement/snapshotRepository/id in pom: | |
server-id: sonatype-nexus-snapshots | |
server-username: SONATYPE_OSSRH_USERNAME | |
server-password: SONATYPE_OSSRH_PASSWORD | |
- name: Deploy to Sonatype snapshot repo | |
run: mvn --batch-mode --file pom.xml --activate-profiles fast deploy | |
env: | |
SONATYPE_OSSRH_USERNAME: ${{ secrets.SONATYPE_OSSRH_USERNAME }} | |
SONATYPE_OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }} | |