From 662b3ae4d58768454ab9d32639e1fd078ea1d424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Tue, 23 Sep 2025 17:21:18 +0200 Subject: [PATCH] Setup sbt-ci-release. --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ build.sbt | 9 --------- project/plugins.sbt | 1 + 3 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ad0ee0c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release +on: + push: + branches: [main] + tags: ["*"] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-java@v5 + with: + java-version: 8 + distribution: adopt + - uses: sbt/setup-sbt@v1 + - uses: coursier/cache-action@v6 + - run: sbt ci-release + env: + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} + PGP_SECRET: ${{ secrets.PGP_SECRET }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} diff --git a/build.sbt b/build.sbt index f30a2db..a204f5b 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,6 @@ val previousVersion: Option[String] = Some("1.1.1") val newScalaBinaryVersionsInThisRelease: Set[String] = Set("3") inThisBuild(Def.settings( - version := "1.1.2-SNAPSHOT", organization := "org.scala-js", scalaVersion := "2.12.11", crossScalaVersions := Seq("2.11.12", "2.12.11", "2.13.2", "3.3.6"), @@ -25,14 +24,6 @@ inThisBuild(Def.settings( Some("scm:git:git@github.com:scala-js/scala-js-logging.git"))), // Publishing - publishMavenStyle := true, - publishTo := { - val nexus = "https://oss.sonatype.org/" - if (version.value.endsWith("-SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") - }, pomExtra := ( diff --git a/project/plugins.sbt b/project/plugins.sbt index 2a00028..1695851 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,3 @@ addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.2")