We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8ddeca commit 517ae97Copy full SHA for 517ae97
github-cli.sh
@@ -32,9 +32,15 @@ create_release(){
32
}
33
34
upload_file(){
35
- curl --data-binary "@$SOURCE_FILE" -i -w '\n' -s -X POST \
36
- -H 'Content-Type: application/octet-stream' \
+ local OUT=$(curl --data-binary "@$SOURCE_FILE" -w "\n%{http_code}\n" \
+ -s -X POST -H 'Content-Type: application/octet-stream' \
37
"https://uploads.github.com/repos/${USERNAME}/${REPOSITORY}/releases/$RELEASE_ID/assets?name=$TARGET_FILE&access_token=$REPO_TOKEN"
38
+ )
39
+
40
+ if test "$(echo "$OUT" | tail -n 1)" -ne "201"; then
41
+ echo -e "> Can't upload file: $TARGET_FILE \n $(echo ${OUT})"
42
+ exit 2
43
+ fi
44
45
46
upload_files(){
0 commit comments