@@ -13,11 +13,18 @@ jobs:
13
13
contents : write
14
14
steps :
15
15
- id : checkout
16
- name : Clone Git Repository
17
- uses : actions/checkout@v3
16
+ name : Checkout
17
+ uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+ - id : last_release
21
+ name : Fetch last release info
22
+ run : echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT
23
+ env :
24
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
18
25
- id : commits
19
26
name : Count Commits
20
- run : echo "count=$(git rev-list --count HEAD --since='last Tuesday' )" >> $GITHUB_OUTPUT
27
+ run : echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD )" >> $GITHUB_OUTPUT
21
28
- id : release
22
29
name : Create Release Version
23
30
if : steps.commits.outputs.count > 0
@@ -66,15 +73,15 @@ jobs:
66
73
- id : deploy-maven
67
74
name : Deploy Maven Artifact
68
75
if : steps.commits.outputs.count > 0
69
- run : |
70
- mvn \
71
- --batch-mode \
72
- --activate-profiles release \
73
- --define scmTag=${{ steps.sha.outputs.sha }} \
74
- --define pgp.secretkey=keyfile:${{ steps.gpg.outputs.filePath }} \
75
- --define pgp.passphrase=literal:${{ secrets.GPG_SECRET_KEY_PASSWORD }} \
76
- --define project.build.outputTimestamp=${{ steps.timestamp.outputs.iso8601 }} \
77
- deploy
76
+ run : >
77
+ mvn
78
+ --batch-mode
79
+ --activate-profiles release
80
+ --define scmTag=${{ steps.sha.outputs.sha }}
81
+ --define pgp.secretkey=keyfile:${{ steps.gpg.outputs.filePath }}
82
+ --define pgp.passphrase=literal:${{ secrets.GPG_SECRET_KEY_PASSWORD }}
83
+ --define project.build.outputTimestamp=${{ steps.timestamp.outputs.iso8601 }}
84
+ deploy
78
85
env :
79
86
MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
80
87
MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
93
100
- id : mail
94
101
name : Send Mail
95
102
if : steps.commits.outputs.count > 0
96
- uses : dawidd6/action-send-mail@v3.7.1
103
+ uses : dawidd6/action-send-mail@v3
97
104
with :
98
105
server_address : ${{ secrets.MAIL_SERVER }}
99
106
server_port : ${{ secrets.MAIL_PORT }}
0 commit comments