From dc123c676f4620f81ca30641e182034552c3e2f2 Mon Sep 17 00:00:00 2001 From: Ryan Ashcraft Date: Wed, 17 Apr 2024 16:48:15 -0400 Subject: [PATCH] #2 :memo: add version badge to readme for easier viewing; :wrench: fix release script --- .github/workflows/release.yaml | 19 ++++++++---- README.md | 1 + .../booz-allen-public-license/license.txt.ftl | 2 +- .../LICENSE.txt | 2 +- .../booz-allen-public-license-python/LICENSE | 2 +- pom.xml | 29 ++++++++++++++----- 6 files changed, 39 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 02077ac..44a5b61 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,13 +28,21 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.11.4' + - name: Load cached Poetry installation + id: cached-poetry + uses: actions/cache@v4 + with: + path: ~/.local + key: poetry-0 # increment to reset cache - name: Install Poetry + if: steps.cached-poetry.outputs.cache-hit != 'true' uses: snok/install-poetry@v1 - name: Set up JDK 11 uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' + cache: maven server-id: 'ossrh' server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD @@ -44,13 +52,12 @@ jobs: run: | git config --local user.email "aissemble-noreply@bah.com" git config --local user.name "Github Actions" - git checkout -b $1-release - mvn -B release:clean release:prepare release:perform -DreleaseVersion=$1 -DdevelopmentVersion=$2 - mvn versions:set -DnewVersion=$2 -DgenerateBackupPoms=false - mvn clean install - mvn scm:checkin -Dmessage=":arrow_up: push example modules to version $2" + git checkout -b ${{ inputs.releaseVersion }}-release + mvn -B release:clean release:prepare release:perform -Possrh-release -DreleaseVersion=${{ inputs.releaseVersion }} -DdevelopmentVersion=${{ inputs.developmentVersion }} -Darguments="-Dhabushu.usePyenv=false" + mvn versions:set -DnewVersion=${{ inputs.developmentVersion }} -DgenerateBackupPoms=false + mvn clean install -Dhabushu.usePyenv=false + mvn scm:checkin -Dmessage=":arrow_up: push example modules to version ${{ inputs.developmentVersion }}" env: MAVEN_USERNAME: ${{ secrets.SONATYPE_CENTRAL_REPO_TOKEN_USER }} MAVEN_PASSWORD: ${{ secrets.SONATYPE_CENTRAL_REPO_TOKEN_KEY }} GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 3a30160..1975282 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![Maven Central](https://img.shields.io/maven-central/v/com.boozallen.aissemble/booz-allen-maven-licenses.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.boozallen.aissemble%22%20AND%20a%3A%22booz-allen-maven-licenses%22) [![Build](https://github.com/boozallen/booz-allen-maven-licenses/actions/workflows/build.yaml/badge.svg)](https://github.com/boozallen/booz-allen-maven-licenses/actions/workflows/build.yaml) # license-maven-plugin diff --git a/booz-allen-licenses/src/license/com/boozallen/booz-allen-public-license/license.txt.ftl b/booz-allen-licenses/src/license/com/boozallen/booz-allen-public-license/license.txt.ftl index 4009e98..7694f91 100644 --- a/booz-allen-licenses/src/license/com/boozallen/booz-allen-public-license/license.txt.ftl +++ b/booz-allen-licenses/src/license/com/boozallen/booz-allen-public-license/license.txt.ftl @@ -2,7 +2,7 @@ Booz Allen Public License v1.0 ------------------------------ INTRODUCTION -The Booz Allen Public License allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, disruptive, and robust code with the goal of Empowering People to Change the World℠. Products licensed under the Booz Allen Public License are founded on the basis that collective ingenuity can make the largest impact in the community. +The Booz Allen Public License allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, disruptive, and robust code with the goal of Empowering People to Change the World(SM). Products licensed under the Booz Allen Public License are founded on the basis that collective ingenuity can make the largest impact in the community. DEFINITIONS * **Commercial Entity.** “Commercial Entity” means any individual or entity other than a government, non-profit academic, or other non-profit entity. diff --git a/license-example-projects/public-license-examples/booz-allen-public-license-java/LICENSE.txt b/license-example-projects/public-license-examples/booz-allen-public-license-java/LICENSE.txt index 054b78c..a9bd80c 100644 --- a/license-example-projects/public-license-examples/booz-allen-public-license-java/LICENSE.txt +++ b/license-example-projects/public-license-examples/booz-allen-public-license-java/LICENSE.txt @@ -2,7 +2,7 @@ Booz Allen Public License v1.0 ------------------------------ INTRODUCTION -The Booz Allen Public License allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, disruptive, and robust code with the goal of Empowering People to Change the World℠. Products licensed under the Booz Allen Public License are founded on the basis that collective ingenuity can make the largest impact in the community. +The Booz Allen Public License allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, disruptive, and robust code with the goal of Empowering People to Change the World(SM). Products licensed under the Booz Allen Public License are founded on the basis that collective ingenuity can make the largest impact in the community. DEFINITIONS * **Commercial Entity.** “Commercial Entity” means any individual or entity other than a government, non-profit academic, or other non-profit entity. diff --git a/license-example-projects/public-license-examples/booz-allen-public-license-python/LICENSE b/license-example-projects/public-license-examples/booz-allen-public-license-python/LICENSE index 054b78c..a9bd80c 100644 --- a/license-example-projects/public-license-examples/booz-allen-public-license-python/LICENSE +++ b/license-example-projects/public-license-examples/booz-allen-public-license-python/LICENSE @@ -2,7 +2,7 @@ Booz Allen Public License v1.0 ------------------------------ INTRODUCTION -The Booz Allen Public License allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, disruptive, and robust code with the goal of Empowering People to Change the World℠. Products licensed under the Booz Allen Public License are founded on the basis that collective ingenuity can make the largest impact in the community. +The Booz Allen Public License allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, disruptive, and robust code with the goal of Empowering People to Change the World(SM). Products licensed under the Booz Allen Public License are founded on the basis that collective ingenuity can make the largest impact in the community. DEFINITIONS * **Commercial Entity.** “Commercial Entity” means any individual or entity other than a government, non-profit academic, or other non-profit entity. diff --git a/pom.xml b/pom.xml index 4338231..856620d 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,10 @@ + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + ossrh https://s01.oss.sonatype.org/content/repositories/releases/ @@ -64,13 +68,13 @@ 2.13.0 - - booz-allen-licenses - license-example-projects - - + + org.sonatype.plugins + nexus-staging-maven-plugin + true + org.apache.maven.plugins maven-enforcer-plugin @@ -125,15 +129,16 @@ 3.0.1 ossrh-release + true org.sonatype.plugins nexus-staging-maven-plugin - ${version.nexus.staging.plugin} + 1.6.13 ossrh - https://s01.oss.sonatype.org/ + https://oss.sonatype.org/ @@ -145,6 +150,16 @@ + + default + + true + + + booz-allen-licenses + license-example-projects + + ossrh-release