File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,14 @@ jobs:
213213
214214 - name : Release
215215 run : |
216- gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA flint-${FLINT_VERSION}.{tar.gz,tar.xz,zip}
216+ # In the case that some thing after the release failed, we still want
217+ # to be able to rerun it without having to create a new release.
218+ API_URL="https://api.github.com/repos/flintlib/flint/releases/tags/v${FLINT_VERSION}"
219+ response=$(curl -s -o /dev/null -w "%{http_code}" "$API_URL")
220+ if test "$response" != "200";
221+ then
222+ gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA flint-${FLINT_VERSION}.{tar.gz,tar.xz,zip}
223+ fi
217224
218225 - if : env.TAG_NAME != 'nightly'
219226 name : " Build PDF documentation"
You can’t perform that action at this time.
0 commit comments