From 1e5aff52ce5e11b4230949efeab58c649a46d126 Mon Sep 17 00:00:00 2001 From: jcpitre Date: Thu, 7 Nov 2024 16:57:35 -0500 Subject: [PATCH] test 15 --- .github/workflows/publish_assets.yml | 11 +++++++---- build.gradle | 13 +++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish_assets.yml b/.github/workflows/publish_assets.yml index 51af062e0d..e563810e46 100644 --- a/.github/workflows/publish_assets.yml +++ b/.github/workflows/publish_assets.yml @@ -15,6 +15,9 @@ jobs: - id: get_version uses: battila7/get-version-action@v2 + - name: printVersion + run: echo "The version is ${{ steps.get_version.outputs.version }}" + - name: Set up JDK 17 uses: actions/setup-java@v3 with: @@ -22,11 +25,11 @@ jobs: distribution: 'zulu' - name: Generate CLI jar - if: github.event_name == 'release' +# if: github.event_name == 'release' run: ./gradlew shadowJar - name: Upload JAR Asset - if: github.event_name == 'release' +# if: github.event_name == 'release' uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -52,11 +55,11 @@ jobs: asset_content_type: application/json - name: Generate JavaDocs - if: github.event_name == 'release' +# if: github.event_name == 'release' run: ./gradlew aggregateJavadoc - name: Zip JavaDocs - if: github.event_name == 'release' +# if: github.event_name == 'release' run: zip -r javadocs.zip build/docs/aggregateJavadoc - name: Upload zipped Javadocs diff --git a/build.gradle b/build.gradle index 2025f48341..026971d982 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,8 @@ * A note about publishing and signing. * Maven central requires that artifacts be signed. And upload is done to Sonatype. * To publish you will need these environment variables defined: - * SONATYPE_USERNAME - * SONATYPE_PASSWORD + * SONATYPE_TOKEN_USERNAME + * SONATYPE_TOKEN_PASSWORD * MAVEN_GPG_PRIVATE_KEY * MAVEN_GPG_PASSPHRASE * Suggestion is to put these in a shell script with restricted read permissions, then source it before calling @@ -109,6 +109,9 @@ subprojects { def fullProjectName = 'gtfs-validator-' + project.name afterEvaluate { + println "SONATYPE_TOKEN_USERNAME = " + System.getenv('SONATYPE_TOKEN_USERNAME') + println "SONATYPE_TOKEN_PASSWORD = " + System.getenv('SONATYPE_TOKEN_PASSWORD') + publishing { repositories { // This is the sonatype staging repo for maven. @@ -119,8 +122,8 @@ subprojects { maven { url = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2' credentials { - username System.getenv("SONATYPE_USERNAME") - password System.getenv("SONATYPE_PASSWORD") + username System.getenv("SONATYPE_TOKEN_USERNAME") + password System.getenv("SONATYPE_TOKEN_PASSWORD") } } } @@ -161,6 +164,8 @@ subprojects { } } signing { + println "MAVEN_GPG_PRIVATE_KEY = " + System.getenv('MAVEN_GPG_PRIVATE_KEY') + println "MAVEN_GPG_PASSPHRASE = " + System.getenv('MAVEN_GPG_PASSPHRASE') useInMemoryPgpKeys(System.getenv('MAVEN_GPG_PRIVATE_KEY'), System.getenv('MAVEN_GPG_PASSPHRASE')) sign publishing.publications.mavenJava }