generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from CDCgov/testm
Updated the pipeline to push to github repo and Maven Central
- Loading branch information
Showing
4 changed files
with
123 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Deploy Maven Packages | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: temurin | ||
|
||
- name: Publish Package - lib-hl7v2-nist | ||
run: mvn -B package | ||
|
||
- name: Deploy to Github Packages | ||
run: mvn deploy --settings .github/workflows/mvn-settings.xml | ||
env: | ||
LIB_GITHUB_ACTOR: '${{ secrets.LIB_GITHUB_ACTOR }}' | ||
LIB_GITHUB_TOKEN: '${{ secrets.LIB_GITHUB_TOKEN }}' |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Java/maven CI/CD Pipeline | ||
on: | ||
push: | ||
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 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Decrypt and Import GPG Key | ||
run: | | ||
gpgconf --kill gpg-agent || true | ||
gpgconf --launch gpg-agent || true | ||
echo "$GPG_PRIVATE_KEY" | gpg --batch --no-tty --import | ||
env: | ||
GPG_PRIVATE_KEY: '${{ secrets.GPG_PRIVATE_KEY }}' | ||
GPG_PASSPHRASE: '${{ secrets.GPG_PASSPHRASE }}' | ||
|
||
- name: Publish to Maven Central | ||
env: | ||
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USERNAME }}' | ||
SONATYPE_PASSWORD: '${{ secrets.SONATYPE_PASSWORD }}' | ||
GPG_PASSPHRASE: '${{ secrets.GPG_PASSPHRASE }}' | ||
run: mvn -B clean deploy --settings .github/workflows/mvn-settings.xml |
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,9 +1,21 @@ | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"> | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | ||
http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
<servers> | ||
<server> | ||
<id>central</id> | ||
<username>${env.SONATYPE_USERNAME}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>gpg.passphrase</id> | ||
<passphrase>${env.GPG_PASSPHRASE}</passphrase> | ||
</server> | ||
<server> | ||
<id>github</id> | ||
<username>${env.LIB_GITHUB_ACTOR}</username> | ||
<password>${env.LIB_GITHUB_TOKEN}</password> | ||
</server> | ||
</servers> | ||
</settings> | ||
</servers> | ||
</settings> |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<artifactId>lib-hl7v2-nist-validator</artifactId> | ||
<name>lib-hl7v2-nist-validator</name> | ||
<description>Library wrapper around NIST HL7v2 Validator for validation of HL7 v2.x messages.</description> | ||
<version>1.3.5</version> | ||
<version>1.3.7</version> | ||
<packaging>jar</packaging> | ||
<url>https://github.com/CDCgov/lib-hl7v2-nist-validator</url> | ||
<licenses> | ||
|
@@ -39,14 +39,54 @@ | |
</repository> | ||
</distributionManagement> | ||
|
||
<url>https://github.com/CDCgov/lib-hl7v2-nist-validator</url> | ||
<licenses> | ||
<license> | ||
<name>The Apache Software License, Version 2.0</name> | ||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
</license> | ||
</licenses> | ||
<developers> | ||
<developer> | ||
<name>Marcelo Caldas</name> | ||
<email>[email protected]</email> | ||
<organization>CDC</organization> | ||
<organizationUrl>https://www.cdc.gov/</organizationUrl> | ||
</developer> | ||
<developer> | ||
<name>Marcia Schulman</name> | ||
<email>[email protected]</email> | ||
<organization>CDC</organization> | ||
<organizationUrl>https://www.cdc.gov</organizationUrl> | ||
</developer> | ||
</developers> | ||
<scm> | ||
<connection>scm:git:git://github.com/CDCgov/lib-hl7v2-nist-validator.git</connection> | ||
<developerConnection>scm:git:ssh://github.com/CDCgov/lib-hl7v2-nist-validator.git</developerConnection> | ||
<url>https://github.com/CDCgov/lib-hl7v2-nist-validator/tree/main</url> | ||
</scm> | ||
<distributionManagement> | ||
<repository> | ||
<id>github</id> | ||
<url>https://maven.pkg.github.com/cdcgov/lib-hl7v2-nist-validator</url> | ||
</repository> | ||
</distributionManagement> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<java.version>17</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
<kotlin.version>1.9.0</kotlin.version> | ||
<nist.version>1.6.3</nist.version> | ||
</properties> | ||
<repositories> | ||
<repository> | ||
<id>hit-nexus</id> | ||
<url>https://hit-nexus.nist.gov/repository/releases</url> | ||
</repository> | ||
</repositories> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
|
@@ -78,7 +118,7 @@ | |
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>1.5</version> | ||
<version>3.2.5</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
|
@@ -256,4 +296,5 @@ | |
</dependency> | ||
</dependencies> | ||
|
||
|
||
</project> |