Skip to content

Commit

Permalink
Publish to central
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Nov 21, 2023
1 parent 396cce2 commit c5c52c5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 14 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -21,7 +23,6 @@ inThisBuild(
"scm:git@github.com:MAIF/wasm4s.git"
)
),
publishMavenStyle := true,
developers := List(
Developer(
"mathieuancelin",
Expand Down Expand Up @@ -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",
Expand All @@ -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"
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")
// addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
6 changes: 6 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "dev"
ThisBuild / version := "1.0.0"

0 comments on commit c5c52c5

Please sign in to comment.