This repository was archived by the owner on Jan 13, 2025. It is now read-only.
Bump com.fasterxml.jackson:jackson-bom from 2.16.0 to 2.17.0 #814
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Maven | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- .github/** | |
- '**.xml' | |
- 'src/**' | |
- 'ide-config' | |
pull_request: | |
paths: | |
- '**.xml' | |
- 'src/**' | |
- 'ide-config' | |
env: | |
GH_BOT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" | |
GH_BOT_NAME: "GitHub Action" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
current: ${{ steps.metadata.outputs.current }} | |
next: ${{ steps.metadata.outputs.next }} | |
snapshot: ${{ steps.metadata.outputs.snapshot }} | |
artifact: ${{ steps.metadata.outputs.artifact }} | |
group: ${{ steps.metadata.outputs.group }} | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ 11 ] | |
graal: [ 22.3.0 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
project: | |
- '.github/project.yml' | |
# Fetches all tags for the repo | |
- name: Fetch tags | |
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: yq - portable yaml processor | |
uses: mikefarah/yq@v4.42.1 | |
- name: Project metadata | |
id: metadata | |
run: | | |
CURRENT=$(yq '.release.current-version' .github/project.yml ) | |
NEXT=$(yq '.release.next-version' .github/project.yml) | |
SNAPSHOT=$(yq '.release.snapshot-version' .github/project.yml) | |
ARTIFACT=$(yq '.jitpack.artifact' .github/project.yml) | |
GROUP=$(yq '.jitpack.group' .github/project.yml) | |
echo $CURRENT $NEXT $SNAPSHOT $GROUP $ARTIFACT | |
if git rev-parse "refs/tags/$NEXT" 2>&1; then | |
echo "Next tag exists" | |
else | |
echo "Tag does not exist yet" | |
fi | |
echo "current=${CURRENT}" >> $GITHUB_OUTPUT | |
echo "next=${NEXT}" >> $GITHUB_OUTPUT | |
echo "snapshot=${SNAPSHOT}" >> $GITHUB_OUTPUT | |
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT | |
echo "group=${GROUP}" >> $GITHUB_OUTPUT | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
cache: maven | |
- name: Check formatting | |
id: mvn-formatting | |
run: | | |
./mvnw -B --no-transfer-progress formatter:validate -pl core,spring5-micrometer,quarkus-micrometer,quarkus-mpmetrics | |
- name: Maven release | |
if: ${{ github.ref == 'refs/heads/main' && steps.filter.outputs.project == 'true' }} | |
id: mvn-build-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CURRENT: ${{ steps.metadata.outputs.current }} | |
NEXT: ${{ steps.metadata.outputs.next }} | |
SNAPSHOT: ${{ steps.metadata.outputs.snapshot }} | |
ARTIFACT: ${{ steps.metadata.outputs.artifact }} | |
run: | | |
if git rev-parse "refs/tags/$NEXT" >/dev/null 2>&1; then | |
echo "🔹 Tagged release alreay exists" | |
./mvnw -B --no-transfer-progress verify | |
echo "release=false" >> $GITHUB_OUTPUT | |
else | |
echo "🔹 Creating new release" | |
# Messy and not maven-y, but whatever. | |
sed -i -r "s|-$CURRENT|-$NEXT|g" mc.sh | |
sed -i -r "s|/$CURRENT|/$NEXT|g" README.md | |
sed -i -r "s|-$CURRENT|-$NEXT|g" README.md | |
sed -i -r "s|<revision>.*</revision>|<revision>$NEXT</revision>|" pom.xml | |
sed -i -r "s/ current-version: .*/ current-version: $NEXT/g" .github/project.yml | |
./mvnw -B --no-transfer-progress package | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git add -u | |
git commit -m "🔖 $NEXT" | |
git push | |
git tag $NEXT | |
git push --tags | |
sed -i -r "s|<revision>.*</revision>|<revision>$SNAPSHOT</revision>|" pom.xml | |
git add pom.xml | |
git commit -m "🔧 Prepare for next release" | |
git push | |
echo "release=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Build with Maven | |
if: ${{ steps.filter.outputs.project == 'false' }} | |
id: mvn-build | |
run: | | |
./mvnw -B --no-transfer-progress verify | |
- name: Pull Quarkus Native Builder Image ${{ matrix.graal }}-java${{ matrix.java }} | |
if: ${{ success() && steps.mvn-build-release.outputs.release != 'true' }} | |
run: docker pull quay.io/quarkus/ubi-quarkus-native-image:${{ matrix.graal }}-java${{ matrix.java }} | |
- name: Native Quarkus build with maven | |
if: ${{ success() && steps.mvn-build-release.outputs.release != 'true' }} | |
run: | | |
./mvnw -B --no-transfer-progress verify -Dnative -Dimages \ | |
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:${{ matrix.graal }}-java${{ matrix.java }} | |
- name: Update tag | |
if: ${{ success() && github.ref == 'refs/heads/main' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: | | |
SNAPSHOT=$(yq '.release.snapshot-version' .github/project.yml) | |
git config user.name ${{ env.GH_BOT_NAME }} | |
git config user.email ${{ env.GH_BOT_EMAIL }} | |
echo "Update tag for $SNAPSHOT" | |
git push origin :refs/tags/$SNAPSHOT | |
git tag -f $SNAPSHOT | |
git push --tags | |