File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Java CI-CD with Gradle
33on :
44 push :
55 tags :
6- - ' *'
6+ - ' v *'
77
88permissions :
99 contents : read
@@ -31,16 +31,22 @@ jobs:
3131 - name : " Stage"
3232 run : |
3333 mkdir -p staging
34- mv build/libs/*.jar staging/
35- - name : " Build & test"
34+ if ls build/libs/*.jar 1> /dev/null 2>&1; then
35+ mv build/libs/*.jar staging/
36+ else
37+ echo "No JAR files found"
38+ exit 1
39+ fi
40+ - name : " Extract Tag"
41+ id : tag
3642 run : |
3743 TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
38- echo "Tag: $TAG"
44+ echo "TAG= $TAG" >> $GITHUB_ENV
3945 - name : " GitHub Release"
4046 uses : " marvinpinto/action-automatic-releases@latest"
4147 with :
4248 repo_token : " ${{ secrets.GITHUB_TOKEN }}"
43- automatic_release_tag : " ${{ steps.build.outputs .TAG }}"
49+ automatic_release_tag : " ${{ env .TAG }}"
4450 prerelease : false
4551 files : |
4652 staging/*.jar
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ plugins {
44}
55
66group = " cn.lunadeer"
7- version = " 3.4 "
7+ version = " 3.5 "
88
99repositories {
1010 mavenCentral()
You can’t perform that action at this time.
0 commit comments