Skip to content

Commit 3e1e37e

Browse files
committed
Remove unnecessary validation and artifact upload steps from Gradle publish workflow
1 parent d6108fa commit 3e1e37e

File tree

1 file changed

+0
-67
lines changed

1 file changed

+0
-67
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -64,70 +64,3 @@ jobs:
6464
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6565
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
6666
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
67-
68-
- name: Query Central Portal for validation errors
69-
if: failure()
70-
shell: bash
71-
env:
72-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
73-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
74-
run: |
75-
set -euo pipefail
76-
77-
OUTPUT_PROPS="build/jreleaser/output.properties"
78-
79-
if [[ ! -f "$OUTPUT_PROPS" ]]; then
80-
echo "::error title=File Missing::The file '$OUTPUT_PROPS' does not exist."
81-
exit 1
82-
fi
83-
84-
DEPLOY_ID=$(grep '^deploymentId=' "$OUTPUT_PROPS" | cut -d= -f2 || true)
85-
if [[ -z "$DEPLOY_ID" ]]; then
86-
echo "::error title=Missing Deployment ID::The 'deploymentId' key was not found in '$OUTPUT_PROPS'."
87-
exit 1
88-
fi
89-
90-
echo "Portal deploymentId: $DEPLOY_ID"
91-
92-
if [ -z "$OSSRH_USERNAME" ]; then
93-
echo "::error title='OSSRH_USERNAME' is not set."
94-
exit 1
95-
fi
96-
97-
if [ -z "$OSSRH_TOKEN" ]; then
98-
echo "::error title='OSSRH_TOKEN' is not set."
99-
exit 1
100-
fi
101-
102-
AUTH=$(printf "%s:%s" "$OSSRH_USERNAME" "$OSSRH_TOKEN" | base64)
103-
echo "::add-mask::$AUTH"
104-
105-
STATUS_JSON=$(curl -sS \
106-
-H "Authorization: Bearer $AUTH" \
107-
-H "Content-Type: application/json" \
108-
-X POST \
109-
"https://central.sonatype.com/api/v1/publisher/status?id=$DEPLOY_ID")
110-
111-
echo "$STATUS_JSON" | jq .
112-
113-
echo "$STATUS_JSON" | jq -r '.errors[]?.message' |
114-
while read -r MSG; do
115-
echo "::error title=Sonatype validation::$MSG"
116-
done
117-
118-
{
119-
echo "### Sonatype Central Portal validation result"
120-
echo
121-
echo '```json'
122-
echo "$STATUS_JSON"
123-
echo '```'
124-
} >> "$GITHUB_STEP_SUMMARY"
125-
126-
- name: Upload JReleaser artefacts
127-
if: always()
128-
uses: actions/upload-artifact@v4
129-
with:
130-
name: jreleaser-logs
131-
path: |
132-
build/jreleaser/trace.log
133-
build/jreleaser/output.properties

0 commit comments

Comments
 (0)