Skip to content

[maven-release-plugin] prepare for next development iteration #3603

[maven-release-plugin] prepare for next development iteration

[maven-release-plugin] prepare for next development iteration #3603

Workflow file for this run

name: Java CI with Maven
on:
push:
branches: [ "main", "release/**" ]
pull_request:
branches: [ "main", "release/**" ]
workflow_dispatch:
permissions:
contents: read
checks: write
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
jdk: [21]
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
# egress-policy: audit
egress-policy: block
disable-sudo: true
allowed-endpoints: >
*.data.mcr.microsoft.com:443
api.github.com:443
archive.ics.uci.edu:80
auth.docker.io:443
build.shibboleth.net:443
cdn01.quay.io:443
docker-images-prod.s3.amazonaws.com:443
docker-images-prod.s3.dualstack.us-east-1.amazonaws.com:443
download.eclipse.org:443
github.com:443
objects.githubusercontent.com:443
raw.githubusercontent.com:443
release-assets.githubusercontent.com:443
hosted-compute-request-orchestrator-prod-eus-01.githubapp.com:443
hosted-compute-request-orchestrator-prod-iad-01.githubapp.com:443
hosted-compute-watchdog-prod-eus-01.githubapp.com:443
hosted-compute-watchdog-prod-eus-02.githubapp.com:443
hosted-compute-watchdog-prod-iad-01.githubapp.com:443
hosted-compute-watchdog-prod-iad-02.githubapp.com:443
maven-central.storage-download.googleapis.com:443
mcr.microsoft.com:443
nodejs.org:443
oss.sonatype.org:443
production.cloudflare.docker.com:443
production.cloudfront.docker.com:443
quay.io:443
registry-1.docker.io:443
registry.npmjs.org:443
repo.maven.apache.org:443
repo.spring.io:443
repo1.maven.org:443
www.ims.uni-stuttgart.de:443
zoidberg.ukp.informatik.tu-darmstadt.de:443
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
cache: maven
server-id: ukp-oss-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Set up Maven
uses: stCarolas/setup-maven@12eb41b233df95d49b0c11fc1b5bc8312e5d4ce0 # v5.1
with:
maven-version: 3.9.14
# - name: Cache Docker layers
# uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 #v5.0.4
# with:
# path: /var/lib/docker
# key: docker-cache-${{ runner.os }}-${{ github.sha }}
# restore-keys: |
# docker-cache-${{ runner.os }}-
- name: Cache DKPro Core Dataset Cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 #v5.0.4
with:
path: inception/cache
key: dkpro-dataset-cache-${{ runner.os }}-${{ github.sha }}
restore-keys: |
dkpro-dataset-cache-${{ runner.os }}-
- name: Cache Node.js
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 #v5.0.4
with:
path: inception/nodejs
key: nodejs-cache-${{ runner.os }}-${{ github.sha }}
restore-keys: |
nodejs-cache-${{ runner.os }}-
- name: Build with Maven
if: "!(matrix.os == 'ubuntu-latest' && github.event_name == 'push')"
run: mvn --show-version --batch-mode --errors --fail-at-end --no-transfer-progress clean verify -T 1C
- name: Build with Maven and publish artifacts
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push'
env:
# `MAVEN_USERNAME` and `MAVEN_PASSWORD` are used in `~/.m2/settings.xml` created by `setup-java` action
MAVEN_USERNAME: ${{ secrets.UKP_MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.UKP_MAVEN_TOKEN }}
run: mvn --show-version --batch-mode --errors --fail-at-end --no-transfer-progress -DdeployAtEnd=true clean deploy
- name: Publish Test Report
uses: mikepenz/action-junit-report@49b2ca06f62aa7ef83ae6769a2179271e160d8e4 # v6.3.1
if: success() || failure() # always run even if the previous step fails
with:
check_name: |
Surefire Report
Vitest Report
report_paths: |
**/target/surefire-reports/TEST-*.xml
**/target/surefire-reports/vitest-test-report.xml
- name: Capture build artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: build-artifacts
path: inception/inception-app-webapp/target/inception-app-webapp-*-standalone.jar
- name: Capture RAT reports
if: failure()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: rat-reports-${{ matrix.os }}
path: '**/target/rat.txt'
if-no-files-found: ignore
- name: Capture build timeline
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: build-artifacts-${{ matrix.os }}
path: target/timeline/timeline.html