Skip to content

Commit 9b4dc3a

Browse files
authored
Update main.yml
1 parent 2e83b84 commit 9b4dc3a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,20 @@ jobs:
8888
if: startsWith(github.ref, 'refs/tags/')
8989
env:
9090
BUTLER_API_KEY: ${{ secrets.ITCHIO_API_KEY }}
91+
GAME_ID: 1018685
9192
run: |
9293
# Get the list of existing releases
93-
releases=$(curl -s -H "Authorization: Bearer $BUTLER_API_KEY" https://itch.io/api/1/my-games/rainlizard/unearth/uploads)
94+
releases=$(curl -s -H "Authorization: Bearer $BUTLER_API_KEY" "https://itch.io/api/1/$BUTLER_API_KEY/my-games/$GAME_ID/uploads")
9495
9596
echo "API response:"
9697
echo "$releases"
9798

9899
# Extract the upload IDs of the releases
99-
upload_ids=$(echo "$releases" | jq -r '.uploads[].id')
100+
upload_ids=$(echo "$releases" | jq -r '.[].id')
100101

101102
# Delete each release
102103
for id in $upload_ids; do
103-
curl -s -X DELETE -H "Authorization: Bearer $BUTLER_API_KEY" https://itch.io/api/1/uploads/$id
104+
curl -s -X DELETE -H "Authorization: Bearer $BUTLER_API_KEY" "https://itch.io/api/1/$BUTLER_API_KEY/uploads/$id"
104105
done
105106

106107
- name: Upload to itch.io

0 commit comments

Comments
 (0)