Skip to content

Commit

Permalink
Merge pull request #5 from rikkarth/dev
Browse files Browse the repository at this point in the history
maven.yml Updated
  • Loading branch information
rikkarth authored Dec 2, 2023
2 parents 4f7032d + 28c9f40 commit 73a4599
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,21 @@ jobs:
- name: Build with Maven
run: mvn -B package --file pom.xml

create_tag:

runs-on: ubuntu-latest

needs: build

if: github.ref == 'refs/heads/main'

steps:
- name: Get version from pom.xml
run: echo "##[set-output name=version]$(xmllint --xpath 'string(/project/version)' pom.xml)"
id: get_version
- name: Create tag
run: |
echo "Creating tag v${{ steps.get_version.outputs.version }}"
git tag -a v${{ steps.get_version.outputs.version }} -m "Release v${{ steps.get_version.outputs.version }}"
git push origin v${{ steps.get_version.outputs.version }}
# create_tag:
#
# runs-on: ubuntu-latest
#
# needs: build
#
# if: github.ref == 'refs/heads/main'
#
# steps:
# - name: Get version from pom.xml
# run: echo "##[set-output name=version]$(xmllint --xpath 'string(/project/version)' pom.xml)"
# id: get_version
# - name: Create tag
# run: |
# echo "Creating tag v${{ steps.get_version.outputs.version }}"
# git tag -a v${{ steps.get_version.outputs.version }} -m "Release v${{ steps.get_version.outputs.version }}"
# git push origin v${{ steps.get_version.outputs.version }}
#

0 comments on commit 73a4599

Please sign in to comment.