@@ -2,7 +2,8 @@ name: Build and release new version
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
5
+ branches :
6
+ - main
6
7
7
8
jobs :
8
9
test :
@@ -16,48 +17,48 @@ jobs:
16
17
name : Build & Test
17
18
18
19
steps :
19
- - uses : actions/checkout@v4
20
- with :
21
- fetch-depth : 0
22
- - name : Setup JDK
23
-
24
- with :
25
- distribution : ' temurin'
26
- java-version : 21
27
- - name : Setup Gradle for a non-wrapper project
28
- uses : gradle/actions/setup-gradle@v4
29
- with :
30
- gradle-version : 8.7
31
-
32
- - name : Build and run tests
33
- run : gradle test --info
34
-
35
- -
uses :
paulhatch/[email protected]
36
- id : tag
37
- with :
38
- bump_each_commit : true
39
- tag_prefix : " "
40
-
41
- - id : notes
42
- run : |
43
- randomDelimiter=${RANDOM}
44
- text="$(git --no-pager log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%h %s")"
45
- echo 'CHANGELOG<<$randomDelimiter' >> $GITHUB_OUTPUT
46
- echo $text >> $GITHUB_OUTPUT
47
- echo '$randomDelimiter' >> $GITHUB_OUTPUT
48
-
49
-
50
- id : create_release
51
- env :
52
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53
- with :
54
- tag_name : ${{ steps.tag.outputs.version }}
55
- release_name : ${{ steps.tag.outputs.version }}
56
- body : |
57
- Changes in this Release
58
- ${{ steps.notes.outputs.CHANGELOG }}
59
-
60
- - name : Publish
61
- run : gradle -Pversion=${{ steps.tag.outputs.version }} publish
62
- env :
63
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
20
+ - uses : actions/checkout@v4
21
+ with :
22
+ fetch-depth : 0
23
+ - name : Setup JDK
24
+
25
+ with :
26
+ distribution : ' temurin'
27
+ java-version : 21
28
+ - name : Setup Gradle for a non-wrapper project
29
+ uses : gradle/actions/setup-gradle@v4
30
+ with :
31
+ gradle-version : 8.7
32
+
33
+ - name : Build and run tests
34
+ run : gradle test --info
35
+
36
+ -
uses :
paulhatch/[email protected]
37
+ id : tag
38
+ with :
39
+ bump_each_commit : true
40
+ tag_prefix : " "
41
+
42
+ - id : notes
43
+ run : |
44
+ randomDelimiter=${RANDOM}
45
+ text="$(git --no-pager log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%h %s")"
46
+ echo 'CHANGELOG<<$randomDelimiter' >> $GITHUB_OUTPUT
47
+ echo $text >> $GITHUB_OUTPUT
48
+ echo '$randomDelimiter' >> $GITHUB_OUTPUT
49
+
50
+
51
+ id : create_release
52
+ env :
53
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
+ with :
55
+ tag_name : ${{ steps.tag.outputs.version }}
56
+ release_name : ${{ steps.tag.outputs.version }}
57
+ body : |
58
+ Changes in this Release
59
+ ${{ steps.notes.outputs.CHANGELOG }}
60
+
61
+ - name : Publish
62
+ run : gradle -Pversion=${{ steps.tag.outputs.version }} publish
63
+ env :
64
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments