From eb71da2d2ebc0dd3a48d0401633f43409604f0c7 Mon Sep 17 00:00:00 2001 From: John Freeman Date: Sun, 17 Nov 2024 14:45:26 +0000 Subject: [PATCH] Fixed Maven CI Friendly Versions (#651) Wasn't versioning the releases. --- .github/workflows/maven-build.yml | 5 +++++ .github/workflows/maven-deploy.yml | 5 +++++ .github/workflows/release.yml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index e2f97a7..3d4198e 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -66,6 +66,11 @@ jobs: echo "M2_HOME=$HOME/.sdkman/candidates/maven/$MAVEN_VERSION" >> $GITHUB_ENV env: MAVEN_VERSION: ${{ matrix.maven-version }} + - name: Set env + run: | + if [[ "$GITHUB_REF" == 'refs/tags/'* ]]; then + echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + fi - name: Build with Maven run: | "$M2_HOME/bin/mvn" install \ diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml index 4430cbd..79c284b 100644 --- a/.github/workflows/maven-deploy.yml +++ b/.github/workflows/maven-deploy.yml @@ -53,6 +53,11 @@ jobs: with: key-suffix: '-deploy' additional-path: '!~/.m2/repository/com/github/gantsign/maven' + - name: Set env + run: | + if [[ "$GITHUB_REF" == 'refs/tags/'* ]]; then + echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + fi - name: Deploy with Maven run: | ./mvnw deploy \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f94b968..e1621ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,11 @@ jobs: run: >- git config --global user.name 'John Freeman' && git config --global user.email '17984707+freemanjp@users.noreply.github.com' + - name: Set env + run: | + if [[ "$GITHUB_REF" == 'refs/tags/'* ]]; then + echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + fi - name: Build Maven site run: | ./mvnw site \