Update .forgejo/workflows/release.yml
Some checks failed
Release / release (push) Failing after 3m28s

This commit is contained in:
root 2025-06-26 10:55:04 +01:00
parent b350c20172
commit 16243f7485

View file

@ -65,7 +65,7 @@ jobs:
API_BASE="https://git.oguerreiro.com/api/v1"
echo "Fetching latest release tag..."
LATEST_TAG=$(curl -sf -H "Authorization: token $TOKEN" \
LATEST_TAG=$(curl -H "Authorization: token $TOKEN" \
"$API_BASE/repos/$REPO_OWNER/$REPO_NAME/tags" \
| jq -r '.[0].name')
@ -76,7 +76,7 @@ jobs:
echo "Latest tag is: $LATEST_TAG"
# Step 1: Get the tag ref object
TAG_REF=$(curl -sf -H "Authorization: token $TOKEN" \
TAG_REF=$(curl -H "Authorization: token $TOKEN" \
"$API_BASE/repos/$REPO_OWNER/$REPO_NAME/git/refs/tags/$LATEST_TAG")
echo "TAG_REF is: $TAG_REF"
@ -97,7 +97,7 @@ jobs:
# Resolve annotated tag to commit SHA
while [ "$TAG_OBJECT_TYPE" != "commit" ]; do
echo "Try : $API_BASE/repos/$REPO_OWNER/$REPO_NAME/git/$TAG_OBJECT_TYPE/$TAG_OBJECT_SHA"
TAG_OBJECT=$(curl -sf -H "Authorization: token $TOKEN" \
TAG_OBJECT=$(curl -H "Authorization: token $TOKEN" \
"$API_BASE/repos/$REPO_OWNER/$REPO_NAME/git/$TAG_OBJECT_TYPE/$TAG_OBJECT_SHA")
echo "Read"
@ -111,7 +111,7 @@ jobs:
# Step 2: If it's a tag object, resolve to commit
if [ "$TAG_OBJECT_TYPE" = "tag" ]; then
COMMIT_SHA=$(curl -sf -H "Authorization: token $TOKEN" \
COMMIT_SHA=$(curl -H "Authorization: token $TOKEN" \
"$API_BASE/repos/$REPO_OWNER/$REPO_NAME/git/tags/$TAG_OBJECT_SHA" \
| jq -r '.object.sha')
else
@ -120,12 +120,12 @@ jobs:
echo "COMMIT_SHA is : $COMMIT_SHA"
# Step 3: Get the commit date
COMMIT_DATE=$(curl -sf -H "Authorization: token $TOKEN" \
COMMIT_DATE=$(curl -H "Authorization: token $TOKEN" \
"$API_BASE/repos/$REPO_OWNER/$REPO_NAME/git/commits/$COMMIT_SHA" \
| jq -r '.committer.date')
echo "Fetching closed issues since $COMMIT_DATE..."
CLOSED_ISSUES_JSON=$(curl -sf -H "Authorization: token $TOKEN" \
CLOSED_ISSUES_JSON=$(curl -H "Authorization: token $TOKEN" \
"$API_BASE/repos/$REPO_OWNER/$REPO_NAME/issues?state=closed&since=$COMMIT_DATE")
if [[ -z "$CLOSED_ISSUES_JSON" ]]; then