-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
10 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
name: Publish Artifact on Release | ||
name: Release | ||
on: | ||
release: | ||
types: [ created ] | ||
|
||
push: | ||
branches: [ master, main ] | ||
tags: [ "*" ] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
cache: sbt | ||
|
||
- name: Clean | ||
run: sbt clean | ||
|
||
- name: Publish | ||
run: sbt publishSigned | ||
- run: sbt ci-release | ||
env: | ||
PGP_KEY_IDENTIFIER: ${{ secrets.PGP_KEY_IDENTIFIER }} | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.15") | ||
//addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0") | ||
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") | ||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.9") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import Publish.refFromTag | ||
import xerial.sbt.Sonatype.* | ||
|
||
ThisBuild / organization := "io.github.rafafrdz" | ||
|
@@ -25,43 +24,17 @@ ThisBuild / developers := List( | |
ThisBuild / description := "A simple DSL to create criterias for filtering data in Scala." | ||
ThisBuild / licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")) | ||
ThisBuild / publish / skip := true | ||
ThisBuild / publishMavenStyle := true | ||
ThisBuild / versionScheme := Some("early-semver") | ||
ThisBuild / pomIncludeRepository := { _ => false } | ||
|
||
/** Reference the project OSS repository */ | ||
// Repository for releases on Maven Central using Sonatype | ||
ThisBuild / publishTo := sonatypePublishToBundle.value | ||
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" | ||
ThisBuild / sonatypeRepository := nexusRepositoryFromTag("https://s01.oss.sonatype.org/") | ||
ThisBuild / sonatypeRepository := "https://s01.oss.sonatype.org/service/local" | ||
ThisBuild / sonatypeProjectHosting := Some( | ||
GitHubHosting( | ||
user = "rafafrdz", | ||
repository = "criterial-dsl", | ||
email = "[email protected]" | ||
) | ||
) | ||
|
||
ThisBuild / credentials += Credentials( | ||
"Sonatype Nexus Repository Manager", | ||
"s01.oss.sonatype.org", | ||
sys.env.getOrElse("SONATYPE_USERNAME", ""), | ||
sys.env.getOrElse("SONATYPE_PASSWORD", "") | ||
) | ||
|
||
ThisBuild / credentials += Credentials( | ||
"GnuPG Key ID", | ||
"gpg", | ||
sys.env.getOrElse("PGP_KEY_IDENTIFIER", ""), | ||
sys.env.getOrElse("PGP_SECRET", "") | ||
) | ||
|
||
def nexusRepositoryFromTag(nexus: String): String = | ||
refFromTag | ||
.flatMap { t => | ||
t.headOption.map { | ||
case 'v' => nexus + "service/local/staging/deploy/maven2/" | ||
case _ => nexus + "content/repositories/snapshots/" | ||
} | ||
} | ||
.getOrElse(nexus + "content/repositories/snapshots/") |
This file was deleted.
Oops, something went wrong.