File tree Expand file tree Collapse file tree 4 files changed +43
-5
lines changed Expand file tree Collapse file tree 4 files changed +43
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : Build Rest Application Release
2
2
3
3
on :
4
- push :
5
- branches :
6
- - master
4
+ release :
5
+ types : [published]
6
+
7
+ permissions :
8
+ packages : write
7
9
8
10
jobs :
9
11
build :
20
22
distribution : ' temurin'
21
23
architecture : x64
22
24
- name : Publish artifacts
23
- run : ./gradlew publish -x check
25
+ run : |
26
+ NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
27
+ echo "New version: ${NEW_VERSION}"
28
+ echo "Github username: ${GITHUB_ACTOR}"
29
+ ./gradlew -Pversion=${NEW_VERSION} publish -x check
24
30
env :
25
31
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
32
Original file line number Diff line number Diff line change
1
+ name : Build Snapshot
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ permissions :
9
+ packages : write
10
+
11
+ jobs :
12
+ build :
13
+ uses : ./.github/workflows/component-build.yml
14
+ release :
15
+ runs-on : ubuntu-latest
16
+ needs : build
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - name : Configure Java version
20
+ uses : actions/setup-java@v3
21
+ with :
22
+ java-version : ' 21'
23
+ distribution : ' temurin'
24
+ architecture : x64
25
+ - name : Publish artifacts
26
+ run : |
27
+ echo "Github username: ${GITHUB_ACTOR}"
28
+ ./gradlew publish -x check
29
+ env :
30
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -34,13 +34,14 @@ subprojects {
34
34
publications {
35
35
create<MavenPublication >(" maven" ) {
36
36
groupId = " com.jongsoft.finance"
37
- version = " 3.3.0-SNAPSHOT "
37
+ version = System .getProperty( " version " )
38
38
from(components[" java" ])
39
39
}
40
40
}
41
41
42
42
repositories {
43
43
maven {
44
+ name = " GitHubPackages"
44
45
url = uri(" https://maven.pkg.github.com/pledger-io/rest-application" )
45
46
credentials {
46
47
username = System .getenv(" GITHUB_ACTOR" )
Original file line number Diff line number Diff line change 1
1
micronautVersion =4.3.4
2
+ version =3.3.0-SNAPSHOT
You can’t perform that action at this time.
0 commit comments