1
0
Fork 0
forked from glenux/mfm

ci: fix repo token

This commit is contained in:
Glenn Y. Rolland 2023-10-25 16:03:22 +02:00
parent 710085311e
commit c156871150

View file

@ -27,6 +27,8 @@ steps:
PACKAGE_UPLOAD_URL: https://code.apps.glenux.net/api/packages/glenux/generic/mfm
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,16 +45,16 @@ steps:
--upload-file "/_cache/bin/$PACKAGE_BASENAME" \
"$PACKAGE_UPLOAD_URL/$DRONE_TAG/$PACKAGE_BASENAME"
- |
set -x
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\": \"DRAFT\", \"prerelease\": false, \"tag_name\": \"$DRONE_TAG\", \"target_commitish\": \"$DRONE_COMMIT_SHA\"}" \
"$RELEASES_URL"
- |
set -x
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
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" \