Closed armanbilge closed 3 years ago
Ahhhh! Nice catch. I didn't even realize this was an issue.
It was easy to miss, because with the plugin's defaults I think it's impossible to publish a snapshot via GitHub actions (publishing snapshots locally is possible, but presumably nobody has tried to push these to sonatype).
I think the build failure is related to https://github.com/sbt/sbt/pull/6363 which is fixed in the latest SBT. So after merging in main, CI should hopefully pass now.
@armanbilge I had to revert this because sonatypeBundleRelease
is actually a command rather than a task, so it can't be called in this fashion. I didn't notice it until attempting to release sbt-spiewak itself. I'm actually not 100% certain how to encode a dynamic task as a command. I'm sure it's possible, I just don't know exactly how.
Shoot, sorry about that. I've been using this in https://github.com/armanbilge/schrodinger/ without problem?
Edit: nope, maybe not actually, never released with it enabled, just snapshots. Sorry again.
No worries! It should still be possible to do this, just has to be encoded as a command, which is about 100x weirder than a task.
This PR creates a
sonatypeBundleReleaseIfRelevant
task which skips thesonatypeBundleRelease
task when releasing a snapshot. This is because snapshots are uploaded directly by thepublishIfRelevant
task and the bundling step is unnecessary (and will fail).SBT still bewilders me so apologies for any blunders or bad code style ...