From 3418c999b87998c1d1afb045e1d99434070f6bff Mon Sep 17 00:00:00 2001 From: rikkarth Date: Fri, 8 Dec 2023 17:14:02 +0000 Subject: [PATCH] maven.yml Update --- .github/workflows/maven.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 928c51b..62316a2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -30,6 +30,25 @@ jobs: - name: Test with Maven run: mvn -B --update-snapshots clean test + tag: + if: github.repository == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up JDK 1.8 + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'corretto' + cache: maven + - name: Create Release + run: | + VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "Creating release for version $VERSION" + git tag -a "v$VERSION" -m "Release $VERSION" + git push origin "$VERSION" + publish: if: github.repository == 'refs/heads/main' runs-on: ubuntu-latest