Skip to content

Commit

Permalink
maven.yml Update
Browse files Browse the repository at this point in the history
  • Loading branch information
rikkarth committed Dec 8, 2023
1 parent 9436ed2 commit 3418c99
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3418c99

Please sign in to comment.