Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/HHS/ASPR-8 into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bischoffz committed Jun 14, 2024
2 parents 1124025 + e69565f commit 72e3bf8
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 6 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
jobs:
release:
runs-on: ubuntu-latest
outputs:
gcm_version: ${{ steps.version-string.outputs.gcm_version }}
permissions:
contents: write
steps:
Expand All @@ -43,8 +45,10 @@ jobs:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSWORD }}

- name: Get GCM Version
id: version-string
run: |
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
echo "gcm_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_OUTPUT"
- name: Make Release
uses: ncipollo/release-action@v1
Expand All @@ -54,3 +58,52 @@ jobs:
tag: "v${{ env.version }}"
generateReleaseNotes: true
skipIfReleaseExists: true


update-gcm-taskit:
needs: release
runs-on: ubuntu-latest
permissions:
contents: write
env:
VERSION: ${{ needs.release.outputs.gcm_version }}
steps:
- name: Checkout GCM
uses: actions/checkout@v4
with:
repository: HHS/ASPR-ms-gcm-taskit
token: ${{ secrets.GHA_BOT }}

- name: Update GCM version
run : |
echo "$VERSION"
sed -i "0,/<gcm.version>.*<\/gcm.version>/s//<gcm.version>$VERSION<\/gcm.version>/g" pom.xml
- name: Increment GCM Taskit Version
run: |
gcm_taskit_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)
echo GCM Taskit Version: $gcm_taskit_version
parts=( ${gcm_version//./ } )
bv=$((parts[2] + 1))
new_version="${parts[0]}.${parts[1]}.${bv}"
echo New GCM Taskit Version: $new_version
sed -i "0,/<revision>.*<\/revision>/s//<revision>$new_version<\/revision>/g" pom.xml
- name: Setup Git
run: |
git config --global user.name "github-actions"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Make branch in GCM Taskit
run: |
git checkout -b update-gcm-to-$VERSION
git add pom.xml
git commit -m "Update gcm to $VERSION"
git push --set-upstream origin update-gcm-to-$VERSION
- name: Make PR in GCM Taskit
run: |
gh pr create -R HHS/ASPR-ms-gcm-taskit -B main --fill
gh pr merge -m --auto
env:
GH_TOKEN: ${{ secrets.GHA_BOT }}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ Distributed under the GPLv3 License. See [LICENSE](LICENSE) for more information

Please read the [HHS vulnerability discloure](https://www.hhs.gov/vulnerability-disclosure-policy/index.html).

## Usage
To use this project in your project, simply add the following dependency to your `dependencies` section of your pom.xml file.
```
<dependency>
<groupId>gov.hhs.aspr.ms.gcm</groupId>
<artifactId>simulation</artifactId>
<version>4.2.0</version>
</dependency>
```

## Overview
There are 3 core tenants to GCM.

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

<!-- Properties -->
<properties>
<revision>4.2.1-SNAPSHOT</revision>
<revision>4.3.0-SNAPSHOT</revision>

<!-- basic project properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -70,7 +70,7 @@
<central-publishing-maven-plugin.version>0.4.0</central-publishing-maven-plugin.version>

<!-- dependency versions -->
<util.version>4.2.0-SNAPSHOT</util.version>
<util.version>4.2.0</util.version>
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<junit-jupiter-engine.version>5.10.2</junit-jupiter-engine.version>
</properties>
Expand Down
10 changes: 6 additions & 4 deletions simulation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<url>https://github.com/HHS/ASPR-8</url>

<scm>
<connection>scm:git:git://github.com/HHS/ASPR-8.git</connection>
<developerConnection>scm:git:ssh://github.com:HHS/ASPR-8.git</developerConnection>
<url>https://github.com/HHS/ASPR-8/tree/main</url>
</scm>
<connection>scm:git:git://github.com/HHS/ASPR-8.git</connection>
<developerConnection>scm:git:ssh://github.com:HHS/ASPR-8.git</developerConnection>
<url>https://github.com/HHS/ASPR-8/tree/main</url>
</scm>

<build>
<plugins>
Expand All @@ -32,6 +32,8 @@
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
<deploymentName>ASPR MS GCM Simulation</deploymentName>
<autoPublish>true</autoPublish>
<waitUntil>published</waitUntil>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 72e3bf8

Please sign in to comment.