fix: fix release pipeline and automate GitHub release creation#291
fix: fix release pipeline and automate GitHub release creation#291
Conversation
The release pipeline was broken at the closeAndReleaseMultipleRepositories task — staging repos were uploaded while still open (OSSRH requires closed state), JSON parsing used fragile regex, POS routed to the wrong staging repo, and Pay/POS were missing from artifact availability polling. Key fixes: - Close staging repos before portal upload (root cause) - Replace regex JSON parsing with groovy.json.JsonSlurper - Route POS to walletconnect staging repository - Fix reown-con → reown-com POM URL typo (publish-module-java) - Add Pay/POS to Maven Central artifact polling with correct groups - Add retry logic (3 attempts) to portal uploads - Fail loudly on empty or no-closed staging repos - Automate git tag + GitHub release in CI workflow - Rewrite manual release workflow with version input and gh CLI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @jakubuid's task in 1m 29s —— View job Review CompleteFound 3 issue(s)Issue 1: Tag creation can fail but release still attemptsID: ci_release-tag-race-8f3a Context:
Recommendation: Add idempotency check: - name: Create git tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
TAG="BOM_${{ steps.version.outputs.bom_version }}"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists, skipping tag creation"
else
git tag "$TAG"
git push origin "$TAG"
fiIssue 2: Incomplete license check validationID: publish-license-typo-2c4f Context:
Recommendation: Use branch-agnostic URL: url.set("https://github.com/reown-com/reown-kotlin/blob/HEAD/LICENSE")Issue 3: HTTP client resource leak in retry loopID: build-httpclient-leak-9a2c Context:
Recommendation: Use repeat(maxRetries) { attempt ->
createHttpClient().use { client ->
try {
val httpPost = HttpPost(uploadUrl).apply {
setHeader("Authorization", authHeader())
setHeader("Content-Type", "application/json")
entity = StringEntity("""{"publishing_type": "automatic"}""")
}
// ... rest of logic
} catch (e: Exception) {
lastException = e
// ... rest of catch
}
}
// Retry logic outside use block
}SummaryCore improvements look solid:
3 issues found, all non-blocking for merge but worth addressing to prevent runtime issues in CI. |
Remove paths filter and module-change checks so pay e2e tests run unconditionally on all PRs targeting develop/master. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @jakubuid's task in 1m 27s —— View job 🔄 Incremental Review: Tasks
Previous Issues StatusIssue 1: Issue 2: Issue 3: Found 3 issue(s)Issue 1: Tag creation can fail but release still attemptsID: ci_release-tag-race-8f3a Context:
Recommendation: Add idempotency check: - name: Create git tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
TAG="BOM_${{ steps.version.outputs.bom_version }}"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists, skipping tag creation"
else
git tag "$TAG"
git push origin "$TAG"
fiIssue 2: License URL points to master branchID: publish-license-typo-2c4f Context:
Recommendation: Use branch-agnostic URL: url.set("https://github.com/reown-com/reown-kotlin/blob/HEAD/LICENSE")Issue 3: HTTP client resource leak in retry loopID: build-httpclient-leak-9a2c Context:
Recommendation: Use repeat(maxRetries) { attempt ->
createHttpClient().use { client ->
try {
val httpPost = HttpPost(uploadUrl).apply {
setHeader("Authorization", authHeader())
setHeader("Content-Type", "application/json")
entity = StringEntity("""{"publishing_type": "automatic"}""")
}
// ... rest of logic
} catch (e: Exception) {
lastException = e
// ... rest of catch
}
}
// Retry logic outside use block
}Summary✅ No new issues found in latest commits. All 3 previously reported issues remain unresolved. |
- Add idempotency check for git tag creation (skip if tag exists) - Use `use` block for CloseableHttpClient in retry loop to prevent resource leaks on exceptions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Addressed auto-review feedback:
|
|
Claude finished @jakubuid's task in 1m 1s —— View job 🔄 Incremental Review: Tasks
Previous Issues StatusIssue 1: Issue 2: Issue 3: Found 1 issue(s)Issue 1: License URL points to master branchID: publish-license-typo-2c4f Context:
Recommendation: Use branch-agnostic URL: url.set("https://github.com/reown-com/reown-kotlin/blob/HEAD/LICENSE")Summary✅ 2 of 3 previously reported issues resolved (tag idempotency + HTTP client leak) |
|



Summary
com.walletconnectbut was routing to thereownstaging repo — now correctly targetswalletconnectreown-con→reown-cominpublish-module-java.gradle.kts(4 occurrences)groovy.json.JsonSlurperinbuild.gradle.ktsArtifactCheckdata class supports different Maven groups (com/reownvscom/walletconnect)BOM_{version}), and creates a GitHub release with auto-generated notesci_github_release.ymlnow accepts a version input and usesghCLI (replaces deprecatedactions/create-release@v1)Architecture
flowchart TD A[Push to master] --> B[Build & publish to Sonatype staging] B --> C["Close staging repos<br/>(NEW: closeReown + closeWalletconnect)"] C --> D[Upload closed repos to Central Portal] D --> E[Wait for Maven Central availability] E --> F["Extract BOM version<br/>(NEW)"] F --> G["Create git tag BOM_{version}<br/>(NEW)"] G --> H["Create GitHub Release<br/>(NEW)"] H --> I[Triggers downstream workflows] I --> J[ci_release_sample.yml] I --> K[slack_release_notifications]Files Changed
buildSrc/.../release-scripts.gradle.ktswalletconnectrepositorybuildSrc/.../publish-module-java.gradle.ktsreown-con→reown-com(4 URLs)build.gradle.kts.github/workflows/ci_release_artifacts.yml.github/workflows/ci_github_release.ymlTest plan
./gradlew :foundation:generatePomFileForMavenJvmPublication— inspect POM forreown-com./gradlew releaseAllSDKs -Ptype=local— check POS publishes undercom/walletconnect/pos/./gradlew help(build script evaluation)ci_release_artifacts.ymlrunci_github_release.ymlwith a version input🤖 Generated with Claude Code