This commit is contained in:
21
.drone.yml
21
.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:
|
||||
|
||||
Reference in New Issue
Block a user