-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
70 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
jq --null-input ^ | ||
--arg tag_name "%CIRRUS_TAG%" ^ | ||
--arg name "cg3 release %CIRRUS_TAG%" ^ | ||
--arg body "$(cat %CIRRUS_WORKING_DIR%/changelog/ChangeLog-%CIRRUS_TAG%.md)" ^ | ||
"{"tag_name": $tag_name, "name": $name, "body": $body, "generate_release_notes": false}" ^ | ||
>release-payload.json | ||
|
||
curl -X POST ^ | ||
-H "Accept: application/vnd.github+json" ^ | ||
-H "Authorization: Bearer %GITHUB_TOKEN%" ^ | ||
-H "X-GitHub-Api-Version: 2022-11-28" ^ | ||
"https://api.github.com/repos/bodand/cg3/releases" ^ | ||
-d "@release-payload.json" | ||
|
||
curl ^ | ||
-H "Accept: application/vnd.github+json" ^ | ||
-H "Authorization: Bearer %GITHUB_TOKEN%" ^ | ||
-H "X-GitHub-Api-Version: 2022-11-28" ^ | ||
"https://api.github.com/repos/bodand/cg3/releases/tags/${CIRRUS_TAG}" | tee response.json | ||
|
||
for /f "usebackq tokens=*" %%r in (`jq .id response.json`) do echo "GH_REL_ID=%%r" >%CIRRUS_ENV% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env sh | ||
|
||
jq --null-input \ | ||
--arg tag_name "${CIRRUS_TAG}" \ | ||
--arg name "cg3 release ${CIRRUS_TAG}" \ | ||
--arg body "$(cat ${CIRRUS_WORKING_DIR}/changelog/ChangeLog-${CIRRUS_TAG}.md)" \ | ||
'{"tag_name": $tag_name, "name": $name, "body": $body, "generate_release_notes": false}' \ | ||
>release-payload.json | ||
|
||
curl -X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${GITHUB_TOKEN}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"https://api.github.com/repos/bodand/cg3/releases" \ | ||
-d "@release-payload.json" | ||
|
||
curl \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${GITHUB_TOKEN}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
"https://api.github.com/repos/bodand/cg3/releases/tags/${CIRRUS_TAG}" | tee response.json | ||
echo "GH_REL_ID=$(jq .id response.json)" >${CIRRUS_ENV} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env sh | ||
|
||
filename=$0 | ||
type=$1 | ||
if [ -z "$type" ]; then | ||
type="application/octet-stream" | ||
fi | ||
|
||
curl -X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${GITHUB_TOKEN}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
-H "Content-Type: $type" \ | ||
"https://uploads.github.com/repos/bodand/cg3/releases/${GH_REL_ID}/assets?name=$filename" \ | ||
--data-binary "@$filename" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cd %BUILD_PATH% | ||
for /f "usebackq" %%v in (`type versioninfo.txt`) do echo "CG_VER=%%v" > %CIRRUS_ENV% |
File renamed without changes.