Skip to content

Merge branch 'release/0.0.4' #8

Merge branch 'release/0.0.4'

Merge branch 'release/0.0.4' #8

Workflow file for this run

name: Produces and releases artifacts
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
name: Build and run tests
steps:
- name: Checkout code
uses: actions/checkout@v4
# Setup JDK and .m2/settings.xml
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
cache: maven
distribution: zulu
server-id: ossrh
server-username: OSS_CENTRAL_USERNAME # env variable for Maven Central
server-password: OSS_CENTRAL_PASSWORD # env variable for Maven Central
# Prepare
- name: Prepare Maven Wrapper
run: chmod +x ./mvnw
# Build
- name: Build with Maven
run: ./mvnw clean verify -U -B -T4 -ntp
# Get GPG private key into GPG
- name: Import GPG Owner Trust
run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust
- name: Import GPG key
run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes
# Publish release
- name: Deploy a new release version to Maven Central
run: ./mvnw clean deploy -B -ntp -DskipTests -DskipItest -DskipExamples -Prelease -Dgpg.keyname="${{ secrets.GPG_KEYNAME }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}"
env:
OSS_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
OSS_CENTRAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- name: Upload coverage information
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Upload test coverage to Codacy
# if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
# run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Kotlin -r _mvn/report-generator/target/jacoco-aggregate/jacoco.xml
# env:
# CODACY_PROJECT_TOKEN: "${{secrets.CODACY_PROJECT_TOKEN}}"