Skip to content

Commit cce75b0

Browse files
committed
Setting version to 0.1.18
Minor changes and formatting in build file Migrated from Legacy OSSRH to Central publishing, token is used to publish
1 parent 65b6a11 commit cce75b0

File tree

3 files changed

+67
-10
lines changed

3 files changed

+67
-10
lines changed

SimpleCommands.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
### Release process
2+
3+
#### Verify gpg is working
4+
5+
```sh
6+
echo "test" | gpg --clearsign -u F7E440260BAE93EB4AD2723D6613CA76E011F638
7+
```
8+
9+
```text
10+
export SONATYPE_USERNAME=<<username>>
11+
export SONATYPE_PASSWORD=<<password>>
12+
```
13+
14+
#### And in your credentials file (~/.sbt/1.0/sonatype.sbt):
15+
16+
```
17+
credentials += Credentials(
18+
"Sonatype Nexus Repository Manager",
19+
"s01.oss.sonatype.org", // Note the s01 subdomain
20+
"your-username",
21+
"your-password"
22+
)
23+
```
24+
25+
#### Copy sonatype.sbt to sonatype.credentials
26+
27+
```
28+
cp sonatype.sbt sonatype.credentials
29+
```
30+
### Run sbt commands
31+
```sh
32+
sbt release
33+
*** Current release and next release has to be same.
34+
35+
sbt sonatypeBundleRelease
36+
37+
```
38+
39+
### Verify
40+
```
41+
Login to central.sonatype.com
42+
Check https://central.sonatype.com/publishing/deployments
43+
44+
Wait for 24 hrs for publishing to complete
45+
46+
```

build.sbt

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations.*
2+
import sbtrelease.ReleaseStateTransformations.{checkSnapshotDependencies, inquireVersions, runClean}
23
import xerial.sbt.Sonatype.*
4+
5+
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
36
organization := "io.github.gmkumar2005"
47
organizationName := "io.github.gmkumar2005"
58
scalaVersion := "2.12.20"
@@ -53,19 +56,27 @@ lazy val root = (project in file(".")).settings(
5356
setReleaseVersion,
5457
commitReleaseVersion,
5558
tagRelease,
56-
ReleaseStep(action = Command.process("publishSigned", _)),
59+
ReleaseStep(action = st => Command.process("publishSigned", st, _ => ())),
5760
setNextVersion,
5861
commitNextVersion
5962
),
60-
publishTo := {
61-
val nexus = "https://s01.oss.sonatype.org/"
62-
if (isSnapshot.value)
63-
Some("snapshots" at nexus + "content/repositories/snapshots")
64-
else
65-
Some("releases" at nexus + "service/local/staging/deploy/maven2")
66-
},
63+
publishMavenStyle := true,
64+
publishTo := sonatypePublishToBundle.value,
65+
// publishTo := {
66+
// val nexus = "https://s01.oss.sonatype.org/"
67+
// if (isSnapshot.value)
68+
// Some("snapshots" at nexus + "content/repositories/snapshots")
69+
// else
70+
// Some("releases" at nexus + "service/local/staging/deploy/maven2")
71+
// },
72+
// credentials += Credentials(
73+
// "Sonatype Nexus Repository Manager",
74+
// "s01.oss.sonatype.org",
75+
// sys.env("SONATYPE_USERNAME"),
76+
// sys.env("SONATYPE_PASSWORD")),
77+
6778
// For all Sonatype accounts created on or after February 2021
68-
sonatypeCredentialHost := "s01.oss.sonatype.org",
79+
// sonatypeCredentialHost := "s01.oss.sonatype.org",
6980
Test / parallelExecution := true,
7081
Test / publishArtifact := false,
7182
usePgpKeyHex("F7E440260BAE93EB4AD2723D6613CA76E011F638")

version.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ThisBuild / version := "0.1.12-SNAPSHOT"
1+
ThisBuild / version := "0.1.18-SNAPSHOT"

0 commit comments

Comments
 (0)