File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 82
82
java-version : 17
83
83
84
84
- name : Build and publish to Bintray/MavenCentral
85
- run : ./build.sh
85
+ run : ./gradlew writeActualVersion
86
+ && export PROJECT_VERSION=`cat version.actual`
87
+ && ./build.sh
86
88
&& ./gradlew publishToSonatype githubRelease closeAndReleaseStagingRepositories releaseSummary
87
89
env :
88
90
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change @@ -111,6 +111,12 @@ tasks {
111
111
}
112
112
}
113
113
114
+ tasks. register(" writeActualVersion" ) {
115
+ doLast {
116
+ file(" version.actual" ) << " $version "
117
+ }
118
+ }
119
+
114
120
tasks. register(" releaseSummary" ) {
115
121
doLast {
116
122
if (isSnapshot) {
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ val currentScalaVersion = "2.13.16"
7
7
inThisBuild(
8
8
Seq (
9
9
scalaVersion := currentScalaVersion,
10
+ // Load version from the file so that Gradle/Shipkit and SBT use the same version
11
+ version := sys.env.getOrElse(" PROJECT_VERSION" , " 0.1.0" )
10
12
)
11
13
)
12
14
You can’t perform that action at this time.
0 commit comments