Skip to content

Commit

Permalink
do not try to publish non-SNAPSHOTs to OSS snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Nov 23, 2023
1 parent 3183c4b commit 0126f3d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ open class OpenFeedback(val project: Project) {
val eventName = System.getenv(EnvVarKeys.GitHub.event)
val ref = System.getenv(EnvVarKeys.GitHub.ref)

if (eventName == "push" && ref == "refs/heads/main") {
if (eventName == "push" && ref == "refs/heads/main" && project.rootProject.version.toString().endsWith("SNAPSHOT")) {
project.logger.log(LogLevel.LIFECYCLE, "Deploying snapshot to OssSnapshot...")
publishIfNeeded.dependsOn(project.tasks.named("publishAllPublicationsToOssSnapshotsRepository"))
}
Expand Down

0 comments on commit 0126f3d

Please sign in to comment.