Skip to content

Commit e139819

Browse files
authored
Fixes check for already released package (#76)
1 parent 294241a commit e139819

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/gradle-publish-base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
if ${{ inputs.release_name == 'latest' }}; then
122122
# SNAPSHOT version should always publish
123123
echo "::set-output name=should_publish::true"
124-
elif curl -s -f -o /dev/null -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$METADATA_URL"; then
124+
elif curl -s -f -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "$METADATA_URL" | grep -q "^200$"; then
125125
# Don't republish existing non-SNAPSHOT versions
126126
echo "Maven package with version $VERSION already exists."
127127
else

0 commit comments

Comments
 (0)