diff --git a/.github/workflows/publish_assets.yml b/.github/workflows/publish_assets.yml index 8a0fa47025..9b5d86c71c 100644 --- a/.github/workflows/publish_assets.yml +++ b/.github/workflows/publish_assets.yml @@ -92,7 +92,7 @@ jobs: uses: ./.github/actions/extract-1password-secret with: OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} # This is required to connect to the vault in our 1Password account. - VARIABLES_TO_EXTRACT: 'MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY' + VARIABLES_TO_EXTRACT: 'MAVEN_GPG_PASSPHRASE, MAVEN_GPG_PRIVATE_KEY, SONATYPE_TOKEN_USERNAME, SONATYPE_TOKEN_PASSWORD' ONE_PASSWORD_SECRET_REFERENCES: ${{ vars.ONE_PASSWORD_SECRET_REFERENCES }} - name: Print extracted value @@ -105,6 +105,6 @@ jobs: # The gradle java verifying plugin does not work with java 17. # Don't verify since it has already been done when the PR was created. ./gradlew publish -x verifyGoogleJavaFormat - env: - SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}} - SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} +# env: +# SONATYPE_TOKEN_USERNAME: ${{secrets.SONATYPE_USERNAME}} +# SONATYPE_TOKEN_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} diff --git a/build.gradle b/build.gradle index 4437390633..026971d982 100644 --- a/build.gradle +++ b/build.gradle @@ -109,8 +109,8 @@ subprojects { def fullProjectName = 'gtfs-validator-' + project.name afterEvaluate { - println "SONATYPE_USERNAME = " + System.getenv('SONATYPE_USERNAME') - println "SONATYPE_PASSWORD = " + System.getenv('SONATYPE_PASSWORD') + println "SONATYPE_TOKEN_USERNAME = " + System.getenv('SONATYPE_TOKEN_USERNAME') + println "SONATYPE_TOKEN_PASSWORD = " + System.getenv('SONATYPE_TOKEN_PASSWORD') publishing { repositories { @@ -122,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") } } }