Skip to content

Commit 8f54b81

Browse files
committed
publish to maven central
1 parent 016783e commit 8f54b81

File tree

5 files changed

+55
-1
lines changed

5 files changed

+55
-1
lines changed

DEVELOPER.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Developing scala-effect-mcp
2+
3+
## Release
4+
5+
* Make sure your GPG key is loaded (eg using `gpg --detach-sign --armor --use-agent --output - README.md`)
6+
* Update `version.sbt` to the new release version (non-snapshot)
7+
* In sbt run
8+
* `clean`
9+
* `test` and see if everything compliles ok
10+
* `publishSigned` to create the artifacts
11+
* `sonaUpload` to upload to maven central portal
12+
* Visit <https://central.sonatype.com/publishing> to check an publish it
13+
* Push the changes
14+
* Create a release in github <https://github.com/linkyard/scala-effect-mcp/releases/new>
15+
* Name: The version, e.g. `1.0.0`
16+
* Release Notes: not all things that changed

build.sbt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
ThisBuild / scalaVersion := Dependencies.scala
22
ThisBuild / organization := "ch.linkyard.mcp"
33
ThisBuild / organizationName := "linkyard ag"
4-
ThisBuild / versionScheme := Some("strict")
4+
ThisBuild / versionScheme := Some("early-semver")
5+
ThisBuild / description := "Library to implement model context protocol servers (MCP) in scala using fs2 and cats effect."
6+
ThisBuild / licenses := Seq("MIT" -> url("https://mit-license.org/"))
57

68
lazy val root = (project in file("."))
79
.settings(
@@ -36,6 +38,9 @@ lazy val root = (project in file("."))
3638
val oldStrategy = (assembly / assemblyMergeStrategy).value
3739
oldStrategy(other)
3840
},
41+
publish / skip := true,
42+
Compile / packageDoc / publishArtifact := true,
43+
Compile / packageSrc / publishArtifact := true,
3944
libraryDependencies ++= Dependencies.logBinding.map(_ % Test),
4045
libraryDependencies ++= Seq(
4146
"io.circe" %% "circe-literal" % Dependencies.circe,
@@ -66,6 +71,7 @@ ThisBuild / commands += Command.command("cleanup") { state =>
6671
lazy val jsonrpc2 = (project in file("jsonrpc2"))
6772
.settings(
6873
name := "jsonrpc2",
74+
publish / skip := false,
6975
libraryDependencies ++= Seq(
7076
"co.fs2" %% "fs2-core" % Dependencies.fs2,
7177
"io.circe" %% "circe-core" % Dependencies.circe,
@@ -75,6 +81,7 @@ lazy val jsonrpc2 = (project in file("jsonrpc2"))
7581
lazy val transportStdio = (project in file("transport/stdio"))
7682
.settings(
7783
name := "jsonrpc2-stdio",
84+
publish / skip := false,
7885
libraryDependencies ++= Seq(
7986
"co.fs2" %% "fs2-io" % Dependencies.fs2,
8087
"io.circe" %% "circe-parser" % Dependencies.circe,
@@ -84,6 +91,7 @@ lazy val transportStdio = (project in file("transport/stdio"))
8491
lazy val mcpProtocol = (project in file("mcp/protocol"))
8592
.settings(
8693
name := "mcp-protocol",
94+
publish / skip := false,
8795
libraryDependencies ++= Seq(
8896
"io.circe" %% "circe-core" % Dependencies.circe,
8997
),
@@ -92,6 +100,7 @@ lazy val mcpProtocol = (project in file("mcp/protocol"))
92100
lazy val mcpServer = (project in file("mcp/server"))
93101
.settings(
94102
name := "mcp-server",
103+
publish / skip := false,
95104
libraryDependencies ++= Seq(
96105
"co.fs2" %% "fs2-core" % Dependencies.fs2,
97106
"co.fs2" %% "fs2-io" % Dependencies.fs2,

project/publish.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")

publish.sbt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
ThisBuild / scmInfo := Some(
2+
ScmInfo(
3+
url("https://github.com/linkyard/scala-effect-mcp"),
4+
"scm:[email protected]:linkyard/scala-effect-mcp.git"
5+
)
6+
)
7+
ThisBuild / developers := List(
8+
Developer(
9+
id = "msiegenthaler",
10+
name = "Mario Siegenthaler",
11+
email = "[email protected]",
12+
url = url("https://github.com/msiegenthaler/")
13+
)
14+
)
15+
16+
ThisBuild / homepage := Some(url("https://github.com/linkyard/scala-effect-mcp"))
17+
18+
// Remove all additional repository other than Maven Central from POM
19+
ThisBuild / pomIncludeRepository := { _ => false }
20+
ThisBuild / publishMavenStyle := true
21+
22+
// new setting for the Central Portal
23+
ThisBuild / publishTo := {
24+
val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/"
25+
if (isSnapshot.value) Some("central-snapshots" at centralSnapshots)
26+
else localStaging.value
27+
}

version.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ThisBuild / version := "0.1.0"

0 commit comments

Comments
 (0)