Skip to content

Commit 2149fa7

Browse files
committed
Refactor publish.yml to streamline GPG signing configuration and remove debug steps
1 parent c9fe6b8 commit 2149fa7

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ jobs:
5353
needs: validate
5454

5555
env:
56+
# Maven Central credentials
5657
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
5758
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
59+
# GPG signing configuration
60+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}
5861
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
5962
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
60-
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}
6163

6264
steps:
6365
- name: Check out code
@@ -84,25 +86,11 @@ jobs:
8486
distribution: 'temurin'
8587
java-version: '17'
8688

87-
- name: Debug Signing Setup
88-
run: |
89-
echo "Environment variables:"
90-
echo "Username set: $([[ -n "$ORG_GRADLE_PROJECT_mavenCentralUsername" ]] && echo "✅" || echo "❌")"
91-
echo "Password set: $([[ -n "$ORG_GRADLE_PROJECT_mavenCentralPassword" ]] && echo "✅" || echo "❌")"
92-
echo "Key ID set: $([[ -n "$ORG_GRADLE_PROJECT_signingInMemoryKeyId" ]] && echo "✅" || echo "❌")"
93-
echo "Key Password set: $([[ -n "$ORG_GRADLE_PROJECT_signingInMemoryKeyPassword" ]] && echo "✅" || echo "❌")"
94-
echo "GPG Key set: $([[ -n "$ORG_GRADLE_PROJECT_signingInMemoryKey" ]] && echo "✅" || echo "❌")"
95-
echo ""
96-
echo "Testing Gradle can see the properties:"
97-
./gradlew properties | grep signingInMemoryKey || echo "❌ signingInMemoryKey not found"
98-
./gradlew properties | grep signingInMemoryKeyId || echo "❌ signingInMemoryKeyId not found"
99-
./gradlew properties | grep signingInMemoryKeyPassword || echo "❌ signingInMemoryKeyPassword not found"
100-
10189
- name: Publish Core Module to Maven Central
102-
run: ./gradlew :decimal-formatter-core:publishToMavenCentral --no-configuration-cache -PsigningInMemoryKeyId="${ORG_GRADLE_PROJECT_signingInMemoryKeyId}" -PsigningInMemoryKey="${ORG_GRADLE_PROJECT_signingInMemoryKey}" -PsigningInMemoryKeyPassword="${ORG_GRADLE_PROJECT_signingInMemoryKeyPassword}" -PmavenCentralUsername="${ORG_GRADLE_PROJECT_mavenCentralUsername}" -PmavenCentralPassword="${ORG_GRADLE_PROJECT_mavenCentralPassword}"
90+
run: ./gradlew :decimal-formatter-core:publishToMavenCentral --no-configuration-cache
10391

10492
- name: Publish Compose Module to Maven Central
105-
run: ./gradlew :decimal-formatter-compose:publishToMavenCentral --no-configuration-cache -PsigningInMemoryKeyId="${ORG_GRADLE_PROJECT_signingInMemoryKeyId}" -PsigningInMemoryKey="${ORG_GRADLE_PROJECT_signingInMemoryKey}" -PsigningInMemoryKeyPassword="${ORG_GRADLE_PROJECT_signingInMemoryKeyPassword}" -PmavenCentralUsername="${ORG_GRADLE_PROJECT_mavenCentralUsername}" -PmavenCentralPassword="${ORG_GRADLE_PROJECT_mavenCentralPassword}"
93+
run: ./gradlew :decimal-formatter-compose:publishToMavenCentral --no-configuration-cache
10694

10795
- name: Verify Publications
10896
run: |

0 commit comments

Comments
 (0)