20 lines
443 B
Bash
Executable File
20 lines
443 B
Bash
Executable File
#!/bin/sh -l
|
|
|
|
set -e
|
|
|
|
SERVER_URL="$1"
|
|
REPOSITORY="$2"
|
|
RELEASE_NAME="$3"
|
|
TAG_NAME="$4"
|
|
IS_DRAFT="$5"
|
|
IS_PRERELEASE="$6"
|
|
RELEASE_BODY="$7"
|
|
API_TOKEN="$8"
|
|
|
|
curl -s -X POST \
|
|
-H "Authorization: token $API_TOKEN" \
|
|
-H "accept: application/json" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"tag_name\": \"$TAG_NAME\", \"name\": \"$RELEASE_NAME\", \"body\": \"$RELEASE_BODY\"}" \
|
|
"$SERVER_URL/api/v1/repos/$REPOSITORY/releases"
|