From 9ec83d9bd9f52e06ef529b8bed12e3532cd3a6a1 Mon Sep 17 00:00:00 2001 From: Guillaume Galy Date: Thu, 25 Jan 2024 11:40:59 +0100 Subject: [PATCH] Test - sonatype error --- .../io/gatling/build/sonatype/GatlingSonatypePlugin.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/scala/io/gatling/build/sonatype/GatlingSonatypePlugin.scala b/src/main/scala/io/gatling/build/sonatype/GatlingSonatypePlugin.scala index 074e116..c1aee03 100644 --- a/src/main/scala/io/gatling/build/sonatype/GatlingSonatypePlugin.scala +++ b/src/main/scala/io/gatling/build/sonatype/GatlingSonatypePlugin.scala @@ -68,7 +68,11 @@ object GatlingSonatypePlugin extends AutoPlugin { ) val conditionalPublishStep: ReleaseStep = { state: State => - if (Project.extract(state).get(gatlingPublishToSonatype)) { + val extractedState = Project.extract(state) + val publishToSonatype = extractedState.get(gatlingPublishToSonatype) + val (_, publishSkip) = extractedState.runTask(publish / skip, state) + + if (publishToSonatype && !publishSkip) { publishStep(state) } else { GatlingReleasePlugin.publishStep(state)