Added exclusions list

This commit is contained in:
XargonWan 2025-01-14 09:24:10 +09:00 committed by GitHub
parent 2a02675fa1
commit 753688ae13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,6 +22,9 @@ jobs:
run: |
# Define the threshold date (1 month ago)
THRESHOLD_DATE=$(date -d "1 month ago" +%Y-%m-%dT%H:%M:%SZ)
# Define the list of tags to be excluded
EXCLUDE_TAGS=("cooker-0.9.0b-ShoujoMonster")
# Get all releases (handle pagination)
ALL_RELEASES=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/$GITHUB_REPOSITORY/releases?per_page=100&page=1")
@ -38,6 +41,11 @@ jobs:
if [ "$RELEASE_ID" == "$LATEST_RELEASE" ]; then
continue
fi
# Skip releases with tags in the exclude list
if [[ " ${EXCLUDE_TAGS[@]} " =~ " ${TAG_NAME} " ]]; then
continue
fi
# Check if the release is older than 1 month
OLD_RELEASES=$(echo "$ALL_RELEASES" | jq --arg threshold "$THRESHOLD_DATE" ".[$i] | select(.published_at < \$threshold) | .id")