File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 80
80
gradle-dependencies-cache-key : |
81
81
gradle/libs.versions.toml
82
82
arguments : |
83
- check apiCheck artifactsCheck dependencyGuard lint ktlintCheck jvmWorkflowNodeBenchmarkJar --no-daemon --stacktrace --continue
83
+ check apiCheck checkVersionIsSnapshot artifactsCheck dependencyGuard lint ktlintCheck jvmWorkflowNodeBenchmarkJar --no-daemon --stacktrace --continue
84
84
concurrent : true
85
85
gradle-build-scan-report : false
86
86
gradle-distribution-sha-256-sum-warning : false
Original file line number Diff line number Diff line change 22
22
distribution : ' zulu'
23
23
java-version : 11
24
24
25
+ - name : Check for -SNAPSHOT version
26
+ run : ./gradlew checkVersionIsSnapshot --no-daemon
27
+
25
28
- name : Publish Snapshots
26
29
run : |
27
30
./gradlew clean build --no-daemon
Original file line number Diff line number Diff line change @@ -16,3 +16,13 @@ version = project.property("VERSION_NAME") as String
16
16
mavenPublish {
17
17
sonatypeHost = SonatypeHost .S01
18
18
}
19
+
20
+ tasks.register(" checkVersionIsSnapshot" ) {
21
+ doLast {
22
+ val expected = " -SNAPSHOT"
23
+ require((version as String ).endsWith(expected)) {
24
+ " The project's version name must be suffixed with `$expected ` when checked in" +
25
+ " to the main branch, but instead it's `$version `."
26
+ }
27
+ }
28
+ }
You can’t perform that action at this time.
0 commit comments