You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
906 B
Bash
35 lines
906 B
Bash
#!/bin/bash
|
|
set -xeuo pipefail
|
|
|
|
TOKEN=$(< token.txt)
|
|
git commit -a
|
|
|
|
COMMIT=$(git log | head -n 1 | cut -d' ' -f2)
|
|
echo $COMMIT
|
|
export PATH=$PATH:"C:\Program Files\7-Zip"
|
|
|
|
7z a -r release-$COMMIT.zip ./build/exe.win-amd64-3.10/*
|
|
|
|
DATA='{
|
|
"body": "Autogenerated release",
|
|
"draft": true,
|
|
"name": "Development release",
|
|
"prerelease": true,
|
|
"tag_name": "testing",
|
|
"target_commitish": "'$COMMIT'"
|
|
}'
|
|
OUT=$(curl -X 'POST' \
|
|
'https://git.deck.sh/api/v1/repos/Interfaz/ff/releases?token='$TOKEN'' \
|
|
-H 'accept: application/json' \
|
|
-H 'Content-Type: application/json' \
|
|
-d "$DATA")
|
|
|
|
ID=$(echo $OUT | cut -d',' -f 1 | cut -d':' -f 2)
|
|
|
|
OUT=curl -X 'POST' \
|
|
'https://git.deck.sh/api/v1/repos/Interfaz/ff/releases/'$ID'/assets?token='$TOKEN'' \
|
|
-H 'accept: application/json' \
|
|
-H 'Content-Type: multipart/form-data' \
|
|
-F 'attachment=@'release-$COMMIT.zip';type=application/x-zip-compressed'
|
|
|