From fffdfe7a5c8f92563db5cbca6c63bdd33db88085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grze=C5=9Blowski?= Date: Mon, 28 Oct 2024 08:26:38 +0100 Subject: [PATCH] Rewrite OSSRH props so it would not be required --- .github/workflows/checkForProtoUpdate.yml | 2 +- .github/workflows/gradle-PR.yml | 2 +- .github/workflows/gradle-master.yml | 4 ---- .github/workflows/release.yml | 4 +--- build.gradle | 4 ++-- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/checkForProtoUpdate.yml b/.github/workflows/checkForProtoUpdate.yml index e762a1a1..405c7e8e 100644 --- a/.github/workflows/checkForProtoUpdate.yml +++ b/.github/workflows/checkForProtoUpdate.yml @@ -21,4 +21,4 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - name: Check for Proto Update with Gradle Wrapper - run: ./gradlew checkForProtoUpdate -PossrhUsername=ignore -PossrhPassword=ignore2 + run: ./gradlew checkForProtoUpdate diff --git a/.github/workflows/gradle-PR.yml b/.github/workflows/gradle-PR.yml index 7dccd40f..78a6e1f8 100644 --- a/.github/workflows/gradle-PR.yml +++ b/.github/workflows/gradle-PR.yml @@ -17,4 +17,4 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - name: Build with Gradle Wrapper - run: ./gradlew build -PossrhUsername=ignore -PossrhPassword=ignore2 + run: ./gradlew build diff --git a/.github/workflows/gradle-master.yml b/.github/workflows/gradle-master.yml index 5ec71c96..bd278d73 100644 --- a/.github/workflows/gradle-master.yml +++ b/.github/workflows/gradle-master.yml @@ -27,8 +27,6 @@ jobs: echo -n "$SECRET_KEY_RING_BASE64" | base64 --decode > secring.gpg ./gradlew build \ publishAllPublicationsToGithubSnapshotsRepository \ - -PossrhUsername=ignore1 \ - -PossrhPassword=ignore2 \ -Psigning.keyId=$KEY_ID \ -Psigning.password=$PASSWORD \ -Psigning.secretKeyRingFile=$(realpath ./secring.gpg) \ @@ -47,5 +45,3 @@ jobs: distribution: 'temurin' - name: Generate and submit dependency graph uses: gradle/actions/dependency-submission@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 - with: - additional-arguments: -PossrhUsername=ignore -PossrhPassword=ignore2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c20a9ad..b3e403c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,6 @@ jobs: git config --global user.email 'actions@github.com' ./gradlew clean releaseVersion \ - -PossrhUsername=ignore \ - -PossrhPassword=ignore2 \ -Psigning.keyId=ignore3 \ -Psigning.password=ignore4 git add gradle.properties @@ -62,7 +60,7 @@ jobs: exit 33 fi - ./gradlew nextSnapshot -PossrhUsername=ignore -PossrhPassword=ignore2 + ./gradlew nextSnapshot git add gradle.properties git commit -m "Update jSuplaVersion to SNAPSHOT version in gradle.properties" diff --git a/build.gradle b/build.gradle index 282aa11c..1b5c864e 100644 --- a/build.gradle +++ b/build.gradle @@ -173,8 +173,8 @@ prodProjects { name = "sonatype" url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") credentials { - username = ossrhUsername - password = ossrhPassword + username = findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME") ?: "" + password = findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD") ?: "" } }