From a8f460906396545d3e95d73d8e4642d5e21ce9f3 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Sat, 11 Jan 2025 12:05:39 +0900 Subject: [PATCH] Deleting the build if inconsistent --- .github/workflows/fetch-release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/fetch-release.yml b/.github/workflows/fetch-release.yml index 89709cc..8f42387 100644 --- a/.github/workflows/fetch-release.yml +++ b/.github/workflows/fetch-release.yml @@ -67,5 +67,15 @@ jobs: echo "Uploading $file..." gh release upload ${{ env.tag_name }} "$file" --clobber done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check for ubuntu-latest.zip and delete release if not found + run: | + if ! ls artifacts | grep -q 'ubuntu-latest.zip'; then + echo "ubuntu-latest.zip not found. Deleting release..." + gh release delete ${{ env.tag_name }} --yes + exit 1 + fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file