Merge pull request 'ci(github-actions): revamp build.yaml to trigger on tags and do proper validation of version' (#96) from build into main
All checks were successful
Build / build (push) Successful in 2m7s

Reviewed-on: #96
This commit is contained in:
Jorge Bornhausen 2025-07-18 08:29:23 +00:00
commit f6e85f2c00

View file

@ -4,6 +4,8 @@ on:
push:
branches:
- "main"
tags:
- '[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
- '.gitattributes'
- '.gitignore'
@ -12,6 +14,7 @@ on:
- 'docs/**'
- 'README.md'
pull_request:
workflow_dispatch:
env:
COMMON_MAVEN_OPTS: "-e -B --fae"
@ -73,6 +76,17 @@ jobs:
- name: Make maven wrapper executable
run: chmod +x mvnw
- name: Validate tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG_NAME="${GITHUB_REF#refs/tags/}"
PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ "$PROJECT_VERSION" != "$TAG_NAME" ]]; then
echo "::error::pom.xml version '$PROJECT_VERSION' does not match tag '$TAG_NAME'"
exit 1
fi
- name: Download dependencies
run: ./mvnw $COMMON_MAVEN_OPTS quarkus:go-offline