-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I couldn't find matching endpoint for gh api repos/${{ github.repository }}/releases/tags/$release -X DELETE in the Delete a release documentation. If I change the job definition to use ids like in the documentation it does seem to work.
# Keep only the last 3 releases
RELEASES=$(gh api repos/${{ github.repository }}/releases --jq '.[].id' | head -n 3)
for release in $(gh api repos/${{ github.repository }}/releases --jq '.[].id'); do
if ! echo "$RELEASES" | grep -q "$release"; then
gh api repos/${{ github.repository }}/releases/$release -X DELETE
fi
done
Metadata
Metadata
Assignees
Labels
No labels