Skip to content

Commit 8b0d850

Browse files
jakubuidclaude
andcommitted
fix: fix release pipeline and automate GitHub release creation
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>
1 parent b43c183 commit 8b0d850

File tree

5 files changed

+192
-194
lines changed

5 files changed

+192
-194
lines changed
Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
1-
name: Create GitHub Release
1+
name: Create GitHub Release (Manual)
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'BOM version (e.g., 1.6.5)'
8+
required: true
9+
type: string
510

611
jobs:
712
create_release:
813
runs-on: ubuntu-latest
9-
1014
steps:
1115
- name: Checkout repository
1216
uses: actions/checkout@v6
13-
14-
- name: Generate Release Notes
15-
id: drafter
16-
uses: release-drafter/release-drafter@v6
1717
with:
18-
config-name: release-drafter.yml
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
18+
ref: master
2119

2220
- name: Create GitHub Release
23-
uses: actions/create-release@v1
2421
env:
25-
GITHUB_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
26-
with:
27-
tag_name: ${{ github.ref }}
28-
release_name: ${{ github.ref }}
29-
body: ${{ steps.drafter.outputs.changelog }}
30-
draft: false
31-
prerelease: false
32-
target_commitish: master
22+
GH_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
23+
run: |
24+
gh release create "BOM_${{ inputs.version }}" \
25+
--target master \
26+
--title "BOM_${{ inputs.version }}" \
27+
--generate-notes

.github/workflows/ci_release_artifacts.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,43 @@ jobs:
8080
run: |
8181
./gradlew releaseAllSDKs -Ptype=sonatype
8282
83-
- name: Upload staging repositories to Central Portal and release
83+
- name: Close staging repositories
8484
env:
85-
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
86-
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
87-
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
85+
CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
86+
CENTRAL_PORTAL_PASSWORD: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
8887
REOWN_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.REOWN_SONATYPE_STAGING_PROFILE_ID }}
8988
WC_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.WC_SONATYPE_STAGING_PROFILE_ID }}
89+
run: |
90+
./gradlew closeReownStagingRepository closeWalletconnectStagingRepository
91+
92+
- name: Upload staging repositories to Central Portal and release
93+
env:
9094
CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
9195
CENTRAL_PORTAL_PASSWORD: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
92-
INTERNAL_MERCHANT_API: ${{ secrets.INTERNAL_MERCHANT_API }}
93-
POS_PROJECT_ID: ${{ secrets.POS_PROJECT_ID }}
96+
REOWN_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.REOWN_SONATYPE_STAGING_PROFILE_ID }}
97+
WC_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.WC_SONATYPE_STAGING_PROFILE_ID }}
98+
run: |
99+
./gradlew closeAndReleaseMultipleRepositories
100+
101+
- name: Extract BOM version
102+
id: version
103+
run: |
104+
VERSION=$(grep 'const val BOM_VERSION' buildSrc/src/main/kotlin/Versions.kt | sed 's/.*"\(.*\)".*/\1/')
105+
echo "bom_version=$VERSION" >> "$GITHUB_OUTPUT"
106+
echo "Extracted BOM version: $VERSION"
107+
108+
- name: Create git tag
109+
run: |
110+
git config user.name "github-actions[bot]"
111+
git config user.email "github-actions[bot]@users.noreply.github.com"
112+
git tag "BOM_${{ steps.version.outputs.bom_version }}"
113+
git push origin "BOM_${{ steps.version.outputs.bom_version }}"
114+
115+
- name: Create GitHub Release
116+
env:
117+
GH_TOKEN: ${{ secrets.PUSH_GITHUB_TOKEN }}
94118
run: |
95-
./gradlew closeAndReleaseMultipleRepositories
119+
gh release create "BOM_${{ steps.version.outputs.bom_version }}" \
120+
--target master \
121+
--title "BOM_${{ steps.version.outputs.bom_version }}" \
122+
--generate-notes

0 commit comments

Comments
 (0)