forked from glenux/mfm
ci: fix repo token
This commit is contained in:
parent
710085311e
commit
c156871150
1 changed files with 10 additions and 8 deletions
18
.drone.yml
18
.drone.yml
|
@ -27,6 +27,8 @@ steps:
|
||||||
PACKAGE_UPLOAD_URL: https://code.apps.glenux.net/api/packages/glenux/generic/mfm
|
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
|
RELEASES_URL: https://code.apps.glenux.net/api/repos/glenux/mfm/releases
|
||||||
PACKAGE_BASENAME: mfm_linux_amd64
|
PACKAGE_BASENAME: mfm_linux_amd64
|
||||||
|
RELEASE_UPLOAD_TOKEN:
|
||||||
|
from_secret: RELEASE_UPLOAD_TOKEN
|
||||||
PACKAGE_UPLOAD_TOKEN:
|
PACKAGE_UPLOAD_TOKEN:
|
||||||
from_secret: PACKAGE_UPLOAD_TOKEN
|
from_secret: PACKAGE_UPLOAD_TOKEN
|
||||||
when:
|
when:
|
||||||
|
@ -43,16 +45,16 @@ steps:
|
||||||
--upload-file "/_cache/bin/$PACKAGE_BASENAME" \
|
--upload-file "/_cache/bin/$PACKAGE_BASENAME" \
|
||||||
"$PACKAGE_UPLOAD_URL/$DRONE_TAG/$PACKAGE_BASENAME"
|
"$PACKAGE_UPLOAD_URL/$DRONE_TAG/$PACKAGE_BASENAME"
|
||||||
- |
|
- |
|
||||||
set -x
|
curl -X 'POST' \
|
||||||
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
|
-H 'Authorization: token $RELEASE_UPLOAD_TOKEN' \
|
||||||
-X POST \
|
-H 'accept: application/json' \
|
||||||
-H "accept: application/json" \
|
-H 'Content-Type: 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\"}" \
|
||||||
-d "{\"tag_name\": \"$DRONE_TAG\", \"target_commitish\": \"$DRONE_COMMIT_SHA\"}" \
|
"$RELEASES_URL"
|
||||||
$RELEASES_URL
|
|
||||||
- |
|
- |
|
||||||
set -x
|
set -x
|
||||||
curl -H "Authorization: token $PACKAGE_UPLOAD_TOKEN" \
|
curl -X POST \
|
||||||
|
-H "Authorization: token $RELEASE_UPLOAD_TOKEN" \
|
||||||
-H "accept: application/json" \
|
-H "accept: application/json" \
|
||||||
-H "Content-Type: multipart/form-data" \
|
-H "Content-Type: multipart/form-data" \
|
||||||
-F "attachment=@/_cache/bin/$PACKAGE_BASENAME" \
|
-F "attachment=@/_cache/bin/$PACKAGE_BASENAME" \
|
||||||
|
|
Loading…
Reference in a new issue