diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index c18aafa53..fbb991d40 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -18,6 +18,8 @@ on: jobs: release: runs-on: ubuntu-latest + outputs: + gcm_version: ${{ steps.version-string.outputs.gcm_version }} permissions: contents: write steps: @@ -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 @@ -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>/s//$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>/s//$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 }} \ No newline at end of file diff --git a/README.md b/README.md index 1a8146de5..c866493af 100644 --- a/README.md +++ b/README.md @@ -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. +``` + + gov.hhs.aspr.ms.gcm + simulation + 4.2.0 + +``` + ## Overview There are 3 core tenants to GCM. diff --git a/pom.xml b/pom.xml index 9411b4eb6..cf454ea6a 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ - 4.2.1-SNAPSHOT + 4.3.0-SNAPSHOT UTF-8 @@ -70,7 +70,7 @@ 0.4.0 - 4.2.0-SNAPSHOT + 4.2.0 0.8.12 5.10.2 diff --git a/simulation/pom.xml b/simulation/pom.xml index 3029979c9..4a12ab589 100644 --- a/simulation/pom.xml +++ b/simulation/pom.xml @@ -17,10 +17,10 @@ https://github.com/HHS/ASPR-8 - scm:git:git://github.com/HHS/ASPR-8.git - scm:git:ssh://github.com:HHS/ASPR-8.git - https://github.com/HHS/ASPR-8/tree/main - + scm:git:git://github.com/HHS/ASPR-8.git + scm:git:ssh://github.com:HHS/ASPR-8.git + https://github.com/HHS/ASPR-8/tree/main + @@ -32,6 +32,8 @@ central true ASPR MS GCM Simulation + true + published