-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated the files * updated the files * updated the files * updated the files * updated the files * updated the files * updated the files * updated the files * updated the files * updated the files * updated yml file with version * updated yml file with version
- Loading branch information
Showing
4 changed files
with
80 additions
and
86 deletions.
There are no files selected for viewing
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,35 +1,37 @@ | ||
name: Build & Publish | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ['master'] | ||
|
||
tags: | ||
- 'v*.*.*' # Adjust the tag pattern to match your versioning scheme | ||
release: | ||
types: [created] # Trigger the workflow when a release is created | ||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: sbt | ||
|
||
- name: Install gnupg | ||
run: sudo apt update && sudo apt install -y gnupg | ||
|
||
- name: Setup JDK And SBT | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "21" | ||
cache: "sbt" | ||
- name: Import PGP secret | ||
run: echo "${{ secrets.PGP_SECRET }}" | base64 --decode | gpg --batch --import | ||
|
||
- name: Publish to Maven Repository | ||
run: sbt ci-release | ||
env: | ||
PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.GPG_PRIVATE_KEY }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
- name: Refresh version tag | ||
run: git pull --tags | ||
|
||
- name: Publish to GitHub Packages | ||
run: sbt publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Publish to Maven Repository | ||
run: sbt clean publishSigned sonatypeBundleRelease | ||
env: | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,55 @@ | ||
inThisBuild(List( | ||
name:= "HL7-PET", | ||
organization := "gov.cdc.hl7", | ||
organizationName:= "CDC", | ||
homepage := Some(url("https://github.com/cdcent/hl7-pet")), | ||
description := "This project is a library to Parse HL7 v2 messages", | ||
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
scmInfo:= Some ( | ||
ScmInfo( | ||
url("https://github.com/cdcgov/hl7-pet"), | ||
"scm:[email protected]/cdcgov/hl7-pet.git" | ||
) | ||
), | ||
developers := List( | ||
Developer( | ||
id="mcq1", | ||
name="Marcelo Caldas", | ||
email = "[email protected]", | ||
url = url ("https://github.com/cdcent/hl7-pet") | ||
) | ||
|
||
inThisBuild( | ||
List( | ||
organization := "gov.cdc", | ||
organizationName:= "CDC", | ||
) | ||
)) | ||
) | ||
|
||
pomIncludeRepository := { _ => false } | ||
credentials += Credentials( | ||
"GitHub Package Registry", | ||
"maven.pkg.github.com", | ||
"cdcgov", | ||
System.getenv("GITHUB_TOKEN") | ||
// Repository for releases on Maven Central using Sonatype | ||
publishTo := sonatypePublishToBundle.value | ||
publishMavenStyle := true | ||
|
||
sonatypeProfileName := "gov.cdc" // Your sonatype groupID | ||
// Reference the project OSS repository | ||
|
||
import xerial.sbt.Sonatype.GitHubHosting | ||
sonatypeProjectHosting := Some( | ||
GitHubHosting(user = "mscaldas2012", repository = "hl7-pet", email = "[email protected]") | ||
) | ||
|
||
licenses:= Seq( | ||
"APL2" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt")) | ||
|
||
homepage := Some(url("https://cdc.gov")) | ||
|
||
scmInfo := Some( | ||
ScmInfo( | ||
url("https://github.com/cdcgov/hl7-pet"), | ||
"scm:[email protected]/cdcgov/hl7-pet.git" | ||
) | ||
) | ||
|
||
credentials += Credentials(Path.userHome / ".sbt" / ".credentials") | ||
sonatypeRepository := { | ||
val nexus = "https://s01.oss.sonatype.org/" | ||
if (isSnapshot.value) nexus + "content/repositories/snapshots" | ||
else nexus + "service/local" | ||
} | ||
|
||
import xerial.sbt.Sonatype.sonatypeCentralHost | ||
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost | ||
ThisBuild / sonatypeRepository := "https://s01.oss.sonatype.org/service/local" | ||
//credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials") | ||
//publishTo := Some("Maven Central" at "https://oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials += Credentials( | ||
"Sonatype Nexus Repository Manager", | ||
"oss.sonatype.org", | ||
sys.env.getOrElse("SONATYPE_USERNAME", ""), | ||
sys.env.getOrElse("SONATYPE_PASSWORD", "") | ||
) | ||
publishMavenStyle := true | ||
|
||
version := "1.2.10" | ||
version := "1.2.11" | ||
scalaVersion := "2.13.13" | ||
|
||
mainClass := Some("gov.cdc.hl7pet.DeIdentifierApp") | ||
|
@@ -49,5 +65,4 @@ libraryDependencies += "com.fasterxml.jackson.module" % "jackson-modules-base" % | |
libraryDependencies += "com.google.code.gson" % "gson" % "2.10.1" | ||
|
||
crossPaths:= true | ||
|
||
publishArtifact in (Compile, packageSrc) := true | ||
|
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,3 +1,7 @@ | ||
//addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3") | ||
// sbt 1 only, see FAQ for 0.13 support | ||
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.0") | ||
unmanagedSourceDirectories.in(Compile) += | ||
baseDirectory.in(ThisBuild).value.getParentFile / | ||
"plugin" / "src" / "main" / "scala" | ||
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1") | ||
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.1") | ||
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") | ||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.11.3") |