Skip to content

Merge pull request #164 from holixon/dependabot/maven/org.mockito-moc… #129

Merge pull request #164 from holixon/dependabot/maven/org.mockito-moc…

Merge pull request #164 from holixon/dependabot/maven/org.mockito-moc… #129

Workflow file for this run

name: Master and Snapshot release
on:
push:
branches:
- master
- develop
- snapshot-producer
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# Setup JDK and Maven
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
cache: maven
server-id: ossrh
server-username: OSS_CENTRAL_USERNAME # env variable for Maven Central
server-password: OSS_CENTRAL_PASSWORD # env variable for Maven Central
- name: Prepare Maven Wrapper
run: chmod +x ./mvnw
- name: Build with Maven
run: ./mvnw clean verify -U -B -T4 -ntp
- name: Prepare I-Tests
run: mkdir -p target/jgiven-reports/json
- name: Run I-Tests with Maven
run: ./mvnw integration-test failsafe:verify -Pitest -B -T4 -ntp
# Get GPG private key into GPG
- name: Import GPG Owner Trust
run: echo ${{ secrets.GPG_OWNERTRUST }} | base64 --decode | gpg --import-ownertrust
if: github.ref == 'refs/heads/master' # limit artifact production to master for the moment
- name: Import GPG key
run: echo ${{ secrets.GPG_SECRET_KEYS }} | base64 --decode | gpg --import --no-tty --batch --yes
if: github.ref == 'refs/heads/master' # limit artifact production to master for the moment
- name: Deploy a new version to central
run: ./mvnw deploy -B -ntp -DskipTests -Prelease -Dgpg.keyname="${{secrets.GPG_KEYNAME}}" -Dgpg.passphrase="${{secrets.GPG_PASSPHRASE}}"
env:
OSS_CENTRAL_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
OSS_CENTRAL_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
if: github.ref == 'refs/heads/master' # limit artifact production to master for the moment
- name: Upload coverage information to CodeCov
uses: codecov/codecov-action@v4
with:
token: "${{ secrets.CODECOV_TOKEN }}"
# FIXME -> acitvate as soon as project become public
# - 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)
# env:
# CODACY_PROJECT_TOKEN: "${{secrets.CODACY_PROJECT_TOKEN}}"