Skip to content

Commit

Permalink
ci: add publishing method
Browse files Browse the repository at this point in the history
  • Loading branch information
markehammons committed Jan 6, 2024
1 parent 17d9d85 commit 3ac2cbc
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 33 deletions.
35 changes: 8 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,14 @@ jobs:
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
b2ba755b-d997-459f-a1a1-b06001257c2c > SIGNING
e5a2f416-de5c-4f2d-bc09-b060011d760b > PASS
44adbbc1-df7f-432f-8034-b060011d5d94 > USERNAME
88fba8d9-e11a-4d8c-bfbd-b06001410130 > SIGNING_PASS
b2ba755b-d997-459f-a1a1-b06001257c2c > PGP_SECRET
e5a2f416-de5c-4f2d-bc09-b060011d760b > SONATYPE_PASSWORD
44adbbc1-df7f-432f-8034-b060011d5d94 > SONATYPE_USERNAME
88fba8d9-e11a-4d8c-bfbd-b06001410130 > PGP_PASSPHRASE
- name: Get JVMs
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
17
19
- run: echo $SIGNING | base64 -d | gpg --import --batch --no-tty
- name: Publish Core
run: |
./mill core.publish --sonatypeCreds "$USERNAME:$PASS" --gpgArgs "--batch" --gpgArgs "--yes" --gpgArgs "-a" --gpgArgs "-b" --gpgArgs "--no-tty" --gpgArgs "--pinentry-mode" --gpgArgs "loopback" --gpgArgs "--passphrase" --gpgArgs "$SIGNING_PASS" --release true
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
- name: Publish J17
run: |
./mill j17.publish --sonatypeCreds "$USERNAME:$PASS" --gpgArgs "--batch" --gpgArgs "--yes" --gpgArgs "-a" --gpgArgs "-b" --gpgArgs "--no-tty" --gpgArgs "--pinentry-mode" --gpgArgs "loopback" --gpgArgs "--passphrase" --gpgArgs "$SIGNING_PASS" --release true
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}

- name: Publish J19
run: ./mill j19.publish --sonatypeCreds "$USERNAME:$PASS" --gpgArgs "--batch" --gpgArgs "--yes" --gpgArgs "-a" --gpgArgs "-b" --gpgArgs "--no-tty" --gpgArgs "--pinentry-mode" --gpgArgs "loopback" --gpgArgs "--passphrase" --gpgArgs "$SIGNING_PASS" --release true

- name: Publish Runtime
run: ./mill runtime.publish --sonatypeCreds "$USERNAME:$PASS" --gpgArgs "--batch" --gpgArgs "--yes" --gpgArgs "-a" --gpgArgs "-b" --gpgArgs "--no-tty" --gpgArgs "--pinentry-mode" --gpgArgs "loopback" --gpgArgs "--passphrase" --gpgArgs "$SIGNING_PASS" --release true
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
java-version: 17
cache: sbt
- run: sbt ci-release
42 changes: 36 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
scalaVersion := "3.3.1"
inThisBuild(List(
organization := "fr.hammons",
homepage := Some(url("https://slinc.hammons.fr/docs/index.html")),
licenses := List(
"LGPL-3.0" -> url("https://www.gnu.org/licenses/lgpl-3.0.en.html")
),
developers := List(
Developer(
"markehammons",
"Mark Edgar Hammons II",
"[email protected]",
url("http://mark.hammons.fr/index.gmi")
),
Developer(
"rrramiro",
"Ramiro Calle",
"",
url("https://github.com/rrramiro")
),
Developer (
"i10416",
"",
"[email protected]",
url("https://github.com/i10416")
)
),
sonatypeCredentialHost := "s01.oss.sonatype.org",
sonatypeRepository := "https://s01.oss.sonatype.org/service/local",
versionScheme := Some("early-semver"),
scalaVersion := "3.3.1",
dynverVTagPrefix := false
))

scalacOptions ++= Seq(
"-deprecation",
Expand All @@ -19,9 +50,8 @@ libraryDependencies += "org.scalameta" %% "munit" % "1.0.0-M10" % Test
libraryDependencies += "org.scalameta" %% "munit-scalacheck" % "1.0.0-M10" % Test
libraryDependencies += "org.scala-lang" %% "scala3-staging" % scalaVersion.value

publishTo := Some(
"Sonatype Nexus" at "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"
)
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")

Compile / doc / scalacOptions ++= Seq("-siteroot", "docs")
mimaPreviousArtifacts := previousStableVersion.value
.map(organization.value %% moduleName.value % _)
.toSet

3 changes: 3 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.5")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("ch.epfl.scala" % "sbt-tasty-mima" % "1.1.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")

0 comments on commit 3ac2cbc

Please sign in to comment.