Skip to content

Commit 7cf2d50

Browse files
committed
Update publish.yml
1 parent 45045a2 commit 7cf2d50

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,12 @@ jobs:
6060
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}
6161

6262
steps:
63-
- name: Debug Signing Setup
64-
run: |
65-
echo "Environment variables:"
66-
echo "Username set: $([[ -n "$ORG_GRADLE_PROJECT_mavenCentralUsername" ]] && echo "✅" || echo "❌")"
67-
echo "Password set: $([[ -n "$ORG_GRADLE_PROJECT_mavenCentralPassword" ]] && echo "✅" || echo "❌")"
68-
echo "Key ID set: $([[ -n "$ORG_GRADLE_PROJECT_signingInMemoryKeyId" ]] && echo "✅" || echo "❌")"
69-
echo "Key Password set: $([[ -n "$ORG_GRADLE_PROJECT_signingInMemoryKeyPassword" ]] && echo "✅" || echo "❌")"
70-
echo "GPG Key set: $([[ -n "$ORG_GRADLE_PROJECT_signingInMemoryKey" ]] && echo "✅" || echo "❌")"
71-
echo ""
72-
echo "Testing Gradle can see the properties:"
73-
./gradlew properties | grep signingInMemoryKey || echo "❌ signingInMemoryKey not found"
74-
7563
- name: Check out code
7664
uses: actions/checkout@v4
7765

66+
- name: Make gradlew executable
67+
run: chmod +x ./gradlew
68+
7869
- name: Validate Gradle Wrapper
7970
uses: gradle/actions/wrapper-validation@v3
8071

@@ -93,11 +84,25 @@ jobs:
9384
distribution: 'temurin'
9485
java-version: '17'
9586

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+
96101
- name: Publish Core Module to Maven Central
97-
run: ./gradlew :decimal-formatter-core:publishToMavenCentral --no-configuration-cache # Publishing releases to Maven Central is not supported yet with configuration caching enabled, because of this missing Gradle feature: https://github.com/gradle/gradle/issues/22779
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}"
98103

99104
- name: Publish Compose Module to Maven Central
100-
run: ./gradlew :decimal-formatter-compose:publishToMavenCentral --no-configuration-cache # Publishing releases to Maven Central is not supported yet with configuration caching enabled, because of this missing Gradle feature: https://github.com/gradle/gradle/issues/22779
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}"
101106

102107
- name: Verify Publications
103108
run: |

0 commit comments

Comments
 (0)