Skip to content

Commit 6f9fdb8

Browse files
fprochazkaclaude
andcommitted
add Maven Central health check before release
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7ba9c91 commit 6f9fdb8

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/jreleaser-release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ jobs:
2424
token: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
2525
fetch-depth: 0
2626

27+
- name: Check Maven Central availability
28+
run: |
29+
COMPONENTS_JSON=$(curl -sf https://status.maven.org/api/v2/components.json)
30+
31+
check_component() {
32+
local name="$1"
33+
local component_status
34+
component_status=$(echo "$COMPONENTS_JSON" | jq -r --arg name "$name" '.components[] | select(.name == $name) | .status')
35+
if [ "$component_status" != "operational" ]; then
36+
echo "::error::Maven Central component '$name' is $component_status"
37+
return 1
38+
fi
39+
echo " $name: $component_status"
40+
}
41+
42+
echo "Maven Central status:"
43+
check_component "Portal - central.sonatype.com"
44+
check_component "Cloudflare CDN/Cache"
45+
2746
- name: Setup Java
2847
uses: actions/setup-java@v4
2948
with:

0 commit comments

Comments
 (0)