From fc542ba388a96ef4ed2b6e6877b3c011869afbdf Mon Sep 17 00:00:00 2001 From: aggarwalakshun Date: Sun, 7 Sep 2025 16:38:58 +0530 Subject: [PATCH] simplify upload-artifacts --- .drone.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index e58ef80..06f42bc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -61,13 +61,22 @@ steps: path: /artifacts - name: upload-artifacts - image: akkuman/gitea-release-action@v1 + image: ubuntu:latest depends_on: [arch-build, debian-build, fedora-build] - with: - files: |- - /artifacts/debian-setup - /artifacts/fedora-setup - /artifacts/arch-setup + commands: + - apt update && apt install -y curl jq + - | + LATEST_TAG=$(curl -s "https://gitea.akshun-lab.cc/api/v1/repos/aggarwalakshun/python-setup/releases/latest" | jq -r '.tag_name') + echo "Latest tag: $LATEST_TAG" + + 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" \ + -H "Authorization: token $GITEA_TOKEN" \ + -H "Content-Type: application/octet-stream" \ + --data-binary @"$file" + done environment: GITEA_TOKEN: