Skip to content

Commit 402df72

Browse files
devcrocodCopilot
andauthored
Update .github/workflows/gradle-publish.yml
Co-authored-by: Copilot <[email protected]>
1 parent 19f671c commit 402df72

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,17 @@ jobs:
7070
run: |
7171
set -euo pipefail
7272
73-
DEPLOY_ID=$(grep '^deploymentId=' build/jreleaser/output.properties | cut -d= -f2)
73+
if [[ ! -f build/jreleaser/output.properties ]]; then
74+
echo "::error title=File Missing::The file 'build/jreleaser/output.properties' does not exist."
75+
exit 1
76+
fi
77+
78+
DEPLOY_ID=$(grep '^deploymentId=' build/jreleaser/output.properties | cut -d= -f2 || true)
79+
if [[ -z "$DEPLOY_ID" ]]; then
80+
echo "::error title=Missing Deployment ID::The 'deploymentId' key was not found in 'build/jreleaser/output.properties'."
81+
exit 1
82+
fi
83+
7484
echo "Portal deploymentId: $DEPLOY_ID"
7585
7686
AUTH=$(printf "%s:%s" "$OSSRH_USERNAME" "$OSSRH_TOKEN" | base64)

0 commit comments

Comments
 (0)