diff --git a/.github/workflows/nexus-release.yml b/.github/workflows/nexus-release.yml index af255e7..28935de 100644 --- a/.github/workflows/nexus-release.yml +++ b/.github/workflows/nexus-release.yml @@ -3,13 +3,19 @@ on: workflow_dispatch: push: branches: - - 'feat/**' #will publish snapshots -# - 'main' #will also publish snapshots - useful before releasing + - 'feat/**' #publish snapshots + - 'main' #also publish snapshots - useful before releasing tags: - - '**' #will publish a release + - '**' #publish a release jobs: build: runs-on: ubuntu-latest + env: + PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + PGP_SECRET : ${{ secrets.GPG_SECRET }} + GPG_OWNERTRUST : ${{ secrets.GPG_OWNERTRUST }} + SONATYPE_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + SONATYPE_USERNAME: ${{ secrets.NEXUS_USERNAME }} steps: - uses: actions/checkout@v4 with: @@ -21,10 +27,12 @@ jobs: cache: sbt - name: Tests run: sbt test + - name: Configure GPG Key + run: | + echo $PGP_SECRET | base64 --decode | gpg --import -v --batch + - name: Configure GPG Ownertrust + run: | + echo -n "$GPG_OWNERTRUST" | base64 --decode | gpg --import-ownertrust - name: Release - run: sbt ci-release - env: - PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - PGP_SECRET : ${{ secrets.GPG_SECRET }} - SONATYPE_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} - SONATYPE_USERNAME: ${{ secrets.NEXUS_USERNAME }} + run: | + sbt ci-release diff --git a/.gitignore b/.gitignore index 5e9b0d6..cc43153 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,7 @@ target .$* .DS_Store +.bloop/ +project/.bloop/ +project/metals.sbt +project/project/ diff --git a/build.sbt b/build.sbt index 1288db8..ba1a05c 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,5 @@ +import xerial.sbt.Sonatype.{sonatypeCentralHost, sonatypeLegacy} + ThisBuild / scalaVersion := "2.13.14" ThisBuild / organization := "com.lectra.kapoeira" ThisBuild / organizationName := "lectra" @@ -10,15 +12,21 @@ ThisBuild / scmInfo := Some( "scm:git:git@github.com/lectra-tech/kapoeira.git" ) ) -ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org" -sonatypeRepository := "https://s01.oss.sonatype.org/service/local" +ThisBuild / sonatypeCredentialHost := sonatypeCentralHost +ThisBuild / versionScheme := Some("semver-spec") +ThisBuild / homepage := Some(url("https://github.com/lectra-tech/kapoeira")) +ThisBuild / developers := List( + Developer( "jvauchel", "Johanna Vauchel", "j.vauchel@lectra.com", url("https://github.com/jvauchel") ), + Developer("ThomasLegoahec", "Thomas Legoahec","t.legoahec@lectra.com",url("https://github.com/ThomasLegoahec")), + Developer("sebastienvidal", "Sébastien Vidal","s.vidal@lectra.com",url("https://github.com/sebastienvidal")), + Developer( "mrebiai", "Mehdi Rebiai", "m.rebiai@lectra.com", url("https://github.com/mrebiai") ), + Developer( "scarisey", "Sylvain Carisey", "s.carisey@lectra.com", url("https://github.com/scarisey") ), +) resolvers += "confluent" at "https://packages.confluent.io/maven/" - val zioVersion = "2.1.9" lazy val root = (project in file(".")) - .enablePlugins(GitVersioning) .settings( name := "kapoeira", // assembly @@ -64,5 +72,3 @@ ThisBuild / assemblyMergeStrategy := { oldStrategy(x) } -// git config -git.useGitDescribe := true