sbt-ci-release icon indicating copy to clipboard operation
sbt-ci-release copied to clipboard

Support to publish snapshots to Central Sonatype

Open chitralverma opened this issue 10 months ago • 7 comments

Since snapshots are now supported by central, can you please add support for publishing snapshots to central ? currently, the plugin fails with - Sonatype Central does not accept snapshots, only official releases. Aborting release.

https://central.sonatype.org/publish/publish-portal-snapshots/

chitralverma avatar Jan 15 '25 13:01 chitralverma

CC https://github.com/xerial/sbt-sonatype/issues/564

chitralverma avatar Jan 16 '25 07:01 chitralverma

CC @SethTisue @eed3si9n

chitralverma avatar Jan 19 '25 12:01 chitralverma

@chitralverma pull request (to sbt-sonatype) welcome

SethTisue avatar Jan 19 '25 14:01 SethTisue

Isn't this the first question on FAQ? (I am asking for reals)

eed3si9n avatar Jan 19 '25 18:01 eed3si9n

import xerial.sbt.Sonatype.sonatypeCentralHost

ThisBuild / sonatypeCredentialHost := sonatypeCentralHost

eed3si9n avatar Jan 19 '25 18:01 eed3si9n

The error we get when trying to publish snapshots to Sonatype Central as-is is from sbt-ci-release itself though: https://github.com/sbt/sbt-ci-release/blob/5473b647da651e6dd14b9dd5d8d73b51d6ccee71/plugin/src/main/scala/com/geirsson/CiReleasePlugin.scala#L172-L177

Do you then think it might be enough to just remove this check and add logic to publish, and the lower-level publication logic is already implemented by sbt-sonatype?

I might have time to try a few things soon

PapyChacal avatar Jan 20 '25 09:01 PapyChacal

@PapyChacal i think changes are required in sbt-sonatype as well because of the repo URL and there are some restrictions there as well.

thats why i raised https://github.com/xerial/sbt-sonatype/issues/564

chitralverma avatar Jan 20 '25 13:01 chitralverma

I'm not sure if this is fully completed yet - see my comment here: https://github.com/sbt/sbt-ci-release/pull/365/files#r2094559720

MartinHH avatar May 18 '25 15:05 MartinHH

My bad. I don't really use snapshot publishing so it didn't occur to me that they don't have tags.

eed3si9n avatar May 18 '25 15:05 eed3si9n