File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,14 @@ name: Publish
3
3
on :
4
4
workflow_dispatch :
5
5
push :
6
- paths-ignore :
7
- - ' .gitignore'
8
- - ' CONTRIBUTING.md'
9
- - ' LICENSE'
10
- - ' README.md'
11
- - ' licenseheader.txt'
6
+ branches :
7
+ - ' main'
8
+ paths-ignore :
9
+ - ' .gitignore'
10
+ - ' CONTRIBUTING.md'
11
+ - ' LICENSE'
12
+ - ' README.md'
13
+ - ' licenseheader.txt'
12
14
13
15
jobs :
14
16
build :
@@ -27,14 +29,17 @@ jobs:
27
29
uses : gradle/actions/wrapper-validation@v4
28
30
- name : Build Project with Gradle
29
31
run : ./gradlew build
32
+ # print github project version to an environment variable.
33
+ - name : Print project version from build.gradle
34
+ run : echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersion)" >> $GITHUB_ENV
30
35
- name : Archive Artifacts to Action.
31
36
uses : actions/upload-artifact@v4
32
37
if : success()
33
38
with :
34
- name : DCIFileReader
39
+ name : DCIFileReader-${{ env.VERSION_INFORMATION }}
35
40
path : build/libs/DCIFileReader-*.jar
36
41
# https://cli.github.com/manual/gh_release_create
37
42
- name : Create release
38
- run : gh release create draft build/libs/DCIFileReader-*.jar --draft --latest --notes "https://github.com/${{github.repository}}/commit/${{github.sha}} https://github.com/${{github.repository}}/commit/${{github.sha}}/checks/ ${{github.run_id}}"
43
+ run : gh release create ${{ env.VERSION_INFORMATION }} build/libs/DCIFileReader-*.jar --draft --latest --notes "**Full Changelog:** https://github.com/${{github.repository}}/commit/${{github.sha}} --- [Action Run & Artifacts]( https://github.com/${{github.repository}}/actions/runs/ ${{github.run_id}}) "
39
44
env :
40
45
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ repositories {
10
10
maven { url = ' https://repo.erdbeerbaerlp.de/repository/maven-public/' }
11
11
}
12
12
13
+ tasks. register(" printVersion" ) {
14
+ println project. version
15
+ }
16
+
13
17
dependencies {
14
18
compileOnly ' de.erdbeerbaerlp:dcintegration.common:3.1.0'
15
19
compileOnly group : ' org.apache.logging.log4j' , name : ' log4j-api' , version : ' 2.17.1'
You can’t perform that action at this time.
0 commit comments