From 8466216d8aeb130fd28cfd7a331b557e407810aa Mon Sep 17 00:00:00 2001 From: OmOmofonmwan Date: Thu, 13 Feb 2025 20:17:20 -0600 Subject: [PATCH] Updated Build WF & Release WF --- .github/workflows/build.yaml | 4 +++- .github/workflows/release.yaml | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c77bf87..6815df6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,6 +7,8 @@ on: push: branches: - main + tags: + - '**' pull_request: branches: - main @@ -24,6 +26,6 @@ jobs: general-build-job: name: General Build - uses: ikmdev/maven-jpms-test-build-action/.github/workflows/build.yaml@main + uses: ikmdev/maven-jpms-test-build-action/.github/workflows/build.yaml@v1.0.0 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d653877..01dbaba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,19 +27,19 @@ jobs: with: token: ${{secrets.IKMDEVOPS_PAT_TOKEN}} - - name: Extrapolate IKM Release Property + - name: Verify Version run: | - CORE_VERSION=$(./mvnw help:evaluate -D'expression=core.artifact.version' -q -D'forceStdout') - RC_VERSION=$(./mvnw help:evaluate -D'expression=core.artifact.release' -q -D'forceStdout') - RC_NUMBER=$(echo "$RC_VERSION" | grep -o -E '[0-9]+') - NEW_RC_NUMBER=$((1 + $RC_NUMBER)) - echo "$CORE_VERSION-r$NEW_RC_NUMBER" - exit 1 - - + CURRENT_VERSION=$(./mvnw help:evaluate -D'expression=project.version' -q -D'forceStdout') + CORE_VERSION=$(./mvnw help:evaluate -D'expression=core.artifact.version' -q -D'forceStdout') + if [[ "$CURRENT_VERSION" != *"$CORE_VERSION"* ]]; then + echo "::error::Current Version Does Not Match Core Version" + echo "::error::Current Version: $CURRENT_VERSION" + echo "::error::Core Version: $CORE_VERSION" + exit 1 + fi - name: Shared Release Action uses: ikmdev/maven-semver-release-action@v2 with: version_type: 'pre-release' - github_token: ${{secrets.GITHUB_TOKEN}} + github_token: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file