This commit is contained in:
11
.drone.yml
11
.drone.yml
@@ -66,13 +66,20 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- apk add jq curl
|
- 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 "Latest tag: $LATEST_TAG"
|
||||||
|
echo "Release ID: $RELEASE_ID"
|
||||||
|
|
||||||
for file in /artifacts/*-setup; do
|
for file in /artifacts/*-setup; do
|
||||||
FILENAME=$(basename "$file")
|
FILENAME=$(basename "$file")
|
||||||
echo "Uploading $FILENAME..."
|
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 "Authorization: token $GITEA_TOKEN" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary @"$file"
|
--data-binary @"$file"
|
||||||
|
|||||||
Reference in New Issue
Block a user