Skip to content

Commit

Permalink
ci:release
Browse files Browse the repository at this point in the history
  • Loading branch information
scarisey committed Sep 11, 2024
1 parent 9425dbb commit 1b1a56d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/nexus-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
target
.$*
.DS_Store
.bloop/
project/.bloop/
project/metals.sbt
project/project/
10 changes: 4 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import xerial.sbt.Sonatype.{sonatypeCentralHost, sonatypeLegacy}

ThisBuild / scalaVersion := "2.13.14"
ThisBuild / organization := "com.lectra.kapoeira"
ThisBuild / organizationName := "lectra"
Expand All @@ -10,15 +12,13 @@ ThisBuild / scmInfo := Some(
"scm:git:[email protected]/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")

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
Expand Down Expand Up @@ -64,5 +64,3 @@ ThisBuild / assemblyMergeStrategy := {
oldStrategy(x)
}

// git config
git.useGitDescribe := true

0 comments on commit 1b1a56d

Please sign in to comment.