Skip to content

ci: fix README update execution in Maven Antrun plugin #28

ci: fix README update execution in Maven Antrun plugin

ci: fix README update execution in Maven Antrun plugin #28

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
deployments: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21' ]
distribution: [ 'zulu', 'temurin' ]
name: Java ${{ matrix.java }} ${{ matrix.distribution }} build
steps:
- uses: actions/checkout@v4
- name: Set up Java ${{ matrix.java }} ${{ matrix.distribution }}
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Install artifact locally
run: mvn -B install -DskipTests --file pom.xml
- name: Test example project
run: >
mvn -B test --file warmupdicator-example/pom.xml
-Dwarmupdicator-spring-boot.version=$(mvn --file pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)
publish-snapshot:
needs: test
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven settings
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish snapshot
run: mvn --no-transfer-progress --batch-mode clean deploy -DskipTests -Prelease
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}