Skip to content

Commit 08a72d1

Browse files
committed
chore(ci): remove jgitver extension
1 parent 350a2df commit 08a72d1

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

.github/workflows/maven-publish.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,26 @@ jobs:
2828
distribution: 'temurin'
2929
server-id: github
3030

31+
- name: Set snapshot version for main branch
32+
if: startsWith(github.ref, 'refs/heads/main')
33+
id: vars
34+
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
35+
36+
- name: Update POM for snapshot version
37+
if: startsWith(github.ref, 'refs/heads/main')
38+
run: mvn -B -ntp versions:set -DnewVersion=1.0-${{ steps.vars.outputs.sha }}-SNAPSHOT -DprocessAllModules -DgenerateBackupPoms=false
39+
40+
- name: Set release version from tag
41+
if: startsWith(github.ref, 'refs/tags/v')
42+
run: |
43+
TAG=${{ github.ref_name }}
44+
VERSION=${TAG#v}
45+
mvn -B -ntp versions:set -DnewVersion=${VERSION} -DprocessAllModules -DgenerateBackupPoms=false
46+
3147
- name: Display Calculated Version
3248
run: mvn -B --no-transfer-progress help:evaluate -Dexpression=project.version -q -DforceStdout
3349

3450
- name: Build and Publish Package
3551
run: mvn -B --no-transfer-progress deploy
3652
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.mvn/extensions.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.mvn/jgitver.config.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)