Skip to content

1.0.2

1.0.2 #203

Workflow file for this run

name: Java CI with Gradle
env:
CI: true
on:
push:
branches: [ "**" ]
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3.1.0
- name: Compile & Test
run: ./gradlew test
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/build/test-results/**/*.xml'
- name: Containerize
run: ./gradlew jib -Djib.console='plain'
env:
DOCKER_USR: ${{ secrets.DOCKER_USR }}
DOCKER_PSW: ${{ secrets.DOCKER_PSW }}
- name: Generate package
run: ./gradlew publish
# todo separate job ?
- name: Deploy released package in MavenCentral
if: startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/tags/')
run: ./gradlew jreleaserDeploy
env:
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVENCENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVENCENTRAL_PASSWORD }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GNUPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GNUPG_PRIVATE_KEY }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}