diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 222ec8d..dc6f68c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | sh ./update-extism.sh - sbt ';+compile;+test;+package;+assembly;+publish' + # sbt ';+compile;+test;+package;+assembly;+doc;+packageDoc;+publishSigned;sonatypeBundleRelease' + # sbt ';+compile;+test;+package;+assembly;+publish' + sbt ';+compile;+test;+package;+assembly' - name: Generate SHA-256 run: | shasum -a 256 ./target/scala-2.13/wasm4s_2.13-${{ inputs.version }}.jar | cut -d ' ' -f 1 > ./target/scala-2.13/wasm4s_2.13-${{ inputs.version }}.jar.sha256 diff --git a/build.sbt b/build.sbt index 9036904..6ce091a 100644 --- a/build.sbt +++ b/build.sbt @@ -1,18 +1,20 @@ import Dependencies.munit +import xerial.sbt.Sonatype._ lazy val scala212 = "2.12.16" lazy val scala213 = "2.13.11" lazy val supportedScalaVersions = List(scala212, scala213) ThisBuild / scalaVersion := scala212 -ThisBuild / organization := "io.otoroshi" -ThisBuild / organizationName := "wasm4s" +ThisBuild / organization := "fr.maif" inThisBuild( List( description := "Library to run wasm vm in a scala app", startYear := Some(2023), - organization := "io.otoroshi", + organization := "fr.maif", + sonatypeProfileName := "fr.maif", + publishMavenStyle := true, homepage := Some(url("https://github.com/MAIF/wasm4s")), licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), scmInfo := Some( @@ -21,7 +23,6 @@ inThisBuild( "scm:git@github.com:MAIF/wasm4s.git" ) ), - publishMavenStyle := true, developers := List( Developer( "mathieuancelin", @@ -57,9 +58,9 @@ lazy val root = (project in file(".")) .settings( name := "wasm4s", crossScalaVersions := supportedScalaVersions, - githubOwner := "MAIF", - githubRepository := "wasm4s", - githubTokenSource := TokenSource.Environment("GITHUB_TOKEN"), + //githubOwner := "MAIF", + //githubRepository := "wasm4s", + //githubTokenSource := TokenSource.Environment("GITHUB_TOKEN"), libraryDependencies ++= Seq( munit % Test, "com.typesafe.play" %% "play-ws" % playWsVersion % "provided", @@ -75,12 +76,17 @@ lazy val root = (project in file(".")) ), ) +usePgpKeyHex("4EFDC6FC2DEC936B13B7478C2F8C0F4E1D397E7F") +sonatypeProjectHosting := Some(GitHubHosting("MAIF", "wasm4s", "mathieu.ancelin@serli.com")) +sonatypeRepository := "https://s01.oss.sonatype.org/service/local" +publishTo := sonatypePublishToBundle.value +sonatypeCredentialHost := "s01.oss.sonatype.org" + assembly / artifact := { val art = (assembly / artifact).value art.withClassifier(Some("bundle")) } addArtifact(assembly / artifact, assembly) - assembly / test := {} assembly / assemblyJarName := s"wasm4s-bundle_${scalaVersion.value.split("\\.").init.mkString(".")}-${version.value}.jar" diff --git a/project/plugins.sbt b/project/plugins.sbt index a0f05a6..25e60d2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.14") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.1.1") -addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") \ No newline at end of file +// addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") \ No newline at end of file diff --git a/publish.sh b/publish.sh new file mode 100644 index 0000000..ab70049 --- /dev/null +++ b/publish.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +echo "ThisBuild / version := \"$1\"" > version.sbt +sh ./update-extism.sh +sbt ';+compile;+test;+package;+assembly;+doc;+packageDoc;+publishSigned;sonatypeBundleRelease' +echo 'ThisBuild / version := "dev"' > version.sbt diff --git a/version.sbt b/version.sbt index 062e9aa..4b6a8b5 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "dev" \ No newline at end of file +ThisBuild / version := "1.0.0" \ No newline at end of file