Compare commits

...

5 commits

Author SHA1 Message Date
737f93245b ci: fix release name
All checks were successful
continuous-integration/drone/push Build is passing
2023-10-25 16:05:54 +02:00
c156871150 ci: fix repo token
Some checks reported errors
continuous-integration/drone/tag Build was killed
2023-10-25 16:03:22 +02:00
710085311e ci: enable debug
Some checks reported errors
continuous-integration/drone/tag Build was killed
2023-10-25 15:35:41 +02:00
cd8aef242e ci: fix release url
Some checks reported errors
continuous-integration/drone/tag Build was killed
2023-10-25 15:32:11 +02:00
ffe68d8658 ci: fix file upload command
All checks were successful
continuous-integration/drone/tag Build is passing
2023-10-25 15:27:55 +02:00

View file

@ -25,8 +25,10 @@ steps:
image: curlimages/curl
environment:
PACKAGE_UPLOAD_URL: https://code.apps.glenux.net/api/packages/glenux/generic/mfm
RELEASES_URL: https://code.apps.glenux.net/api/repos/glenux/releases
RELEASES_URL: https://code.apps.glenux.net/api/repos/glenux/mfm/releases
PACKAGE_BASENAME: mfm_linux_amd64
RELEASE_UPLOAD_TOKEN:
from_secret: RELEASE_UPLOAD_TOKEN
PACKAGE_UPLOAD_TOKEN:
from_secret: PACKAGE_UPLOAD_TOKEN
when:
@ -43,17 +45,19 @@ steps:
--upload-file "/_cache/bin/$PACKAGE_BASENAME" \
"$PACKAGE_UPLOAD_URL/$DRONE_TAG/$PACKAGE_BASENAME"
- |
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
-X POST \
-H "accept: application/json" \
-H "content-type: application/json" \
-d "{\"tag_name\": \"$DRONE_TAG\", \"target_commitish\": \"$DRONE_COMMIT_SHA\"}" \
$RELEASES_URL
curl -X 'POST' \
-H 'Authorization: token $RELEASE_UPLOAD_TOKEN' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d "{\"body\": \"DRAFT\", \"draft\": true, \"name\": \"$DRONE_TAG - DRAFT\", \"prerelease\": false, \"tag_name\": \"$DRONE_TAG\", \"target_commitish\": \"$DRONE_COMMIT_SHA\"}" \
"$RELEASES_URL"
- |
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
--upload-file "attachment=@/_cache/bin/$PACKAGE_BASENAME" \
set -x
curl -X POST \
-H "Authorization: token $RELEASE_UPLOAD_TOKEN" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "attachment=@/_cache/bin/$PACKAGE_BASENAME" \
"$RELEASES_URL/$DRONE_TAG/assets?name=$PACKAGE_BASENAME"