Skip to content

Publish jar to Maven Central (#120) #545

Publish jar to Maven Central (#120)

Publish jar to Maven Central (#120) #545

name: Build and test
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Verify
run: mvn --no-transfer-progress --batch-mode verify
# - name: Validate Javadoc creation
# run: mvn --no-transfer-progress --batch-mode javadoc:jar
- name: Package surefire test results
if: failure()
run: |
rm -rf test-results
mkdir test-results
find . -type d -name "*surefire*" -exec cp --parents -R {} test-results/ \;
zip -r test-results.zip test-results
- name: Upload test results
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results
path: test-results.zip