diff --git a/.drone.yml b/.drone.yml index 2d74314..a107aac 100644 --- a/.drone.yml +++ b/.drone.yml @@ -66,13 +66,20 @@ steps: commands: - apk add jq curl - | - LATEST_TAG=$(curl -s "https://gitea.akshun-lab.cc/api/v1/repos/aggarwalakshun/python-setup/releases/latest" | jq -r '.tag_name') + # Get the latest release information + RELEASE_INFO=$(curl -s "https://gitea.akshun-lab.cc/api/v1/repos/aggarwalakshun/python-setup/releases/latest") + LATEST_TAG=$(echo "$RELEASE_INFO" | jq -r '.tag_name') + RELEASE_ID=$(echo "$RELEASE_INFO" | jq -r '.id') + echo "Latest tag: $LATEST_TAG" + echo "Release ID: $RELEASE_ID" for file in /artifacts/*-setup; do FILENAME=$(basename "$file") echo "Uploading $FILENAME..." - curl -X POST "https://gitea.akshun-lab.cc/api/v1/repos/aggarwalakshun/python-setup/releases/$LATEST_TAG/assets?name=$FILENAME" \ + + # Use the release ID instead of tag name in the URL + curl -X POST "https://gitea.akshun-lab.cc/api/v1/repos/aggarwalakshun/python-setup/releases/$RELEASE_ID/assets?name=$FILENAME" \ -H "Authorization: token $GITEA_TOKEN" \ -H "Content-Type: application/octet-stream" \ --data-binary @"$file"