Skip to content

Commit

Permalink
ci(publish nexus):workflow for publishing to nexus
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Carisey <[email protected]>
  • Loading branch information
scarisey committed Sep 10, 2024
1 parent 5469a77 commit 9425dbb
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/nexus-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- 'feat/**' #will publish snapshots
# - 'main' #will also publish snapshots - useful before releasing
tags:
- '**' #will publish a release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt
- name: Tests
run: sbt test
- 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 }}
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
ThisBuild / scalaVersion := "2.13.14"
ThisBuild / organization := "com.lectra.kafka"
ThisBuild / organization := "com.lectra.kapoeira"
ThisBuild / organizationName := "lectra"
ThisBuild / licenses += "Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")
ThisBuild / publishConfiguration := publishConfiguration.value.withOverwrite(true)
ThisBuild / publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true)
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/lectra-tech/kapoeira"),
"scm:git:[email protected]/lectra-tech/kapoeira.git"
)
)
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeRepository := "https://s01.oss.sonatype.org/service/local"

resolvers += "confluent" at "https://packages.confluent.io/maven/"

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.1")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.2.0")
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.1")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1")

0 comments on commit 9425dbb

Please sign in to comment.