Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| 9121b54fb3 |
2 changed files with 18 additions and 7 deletions
|
|
@ -43,21 +43,32 @@ jobs:
|
||||||
TAG="${GITHUB_REF_NAME}"
|
TAG="${GITHUB_REF_NAME}"
|
||||||
API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
|
API="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
|
||||||
|
|
||||||
# Create the release
|
# Create the release. `curl -sf` hid the reason a tag build could not
|
||||||
curl -sf -X POST "${API}/releases" \
|
# publish, which left devices on the previous release with no clue,
|
||||||
|
# so report the status code and the API answer.
|
||||||
|
HTTP=$(curl -sS -o /tmp/release.json -w "%{http_code}" -X POST "${API}/releases" \
|
||||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\"}" \
|
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\"}")
|
||||||
-o /tmp/release.json
|
if [ "${HTTP}" != "201" ] && [ "${HTTP}" != "200" ]; then
|
||||||
|
echo "Release creation for ${TAG} failed with HTTP ${HTTP}:"
|
||||||
|
cat /tmp/release.json
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
RELEASE_ID=$(python3 -c "import json; print(json.load(open('/tmp/release.json'))['id'])")
|
RELEASE_ID=$(python3 -c "import json; print(json.load(open('/tmp/release.json'))['id'])")
|
||||||
|
|
||||||
# Upload assets
|
# Upload assets
|
||||||
for FILE in dist/itch.zip dist/itch.zip.sha256.txt; do
|
for FILE in dist/itch.zip dist/itch.zip.sha256.txt; do
|
||||||
NAME=$(basename "$FILE")
|
NAME=$(basename "$FILE")
|
||||||
curl -sf -X POST \
|
HTTP=$(curl -sS -o /tmp/asset.json -w "%{http_code}" -X POST \
|
||||||
"${API}/releases/${RELEASE_ID}/assets?name=${NAME}" \
|
"${API}/releases/${RELEASE_ID}/assets?name=${NAME}" \
|
||||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary "@${FILE}"
|
--data-binary "@${FILE}")
|
||||||
|
if [ "${HTTP}" != "201" ] && [ "${HTTP}" != "200" ]; then
|
||||||
|
echo "Asset upload of ${NAME} failed with HTTP ${HTTP}:"
|
||||||
|
cat /tmp/asset.json
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"plugin.id": "itch",
|
"plugin.id": "itch",
|
||||||
"plugin.name": "itch.io",
|
"plugin.name": "itch.io",
|
||||||
"plugin.version": "0.1.42",
|
"plugin.version": "0.1.43",
|
||||||
"plugin.min-api-version": "1.1.0",
|
"plugin.min-api-version": "1.1.0",
|
||||||
"plugin.link": "https://forge.thergic.ar/jose/itchio-opengamepadui-plugin",
|
"plugin.link": "https://forge.thergic.ar/jose/itchio-opengamepadui-plugin",
|
||||||
"plugin.source": "https://forge.thergic.ar/jose/itchio-opengamepadui-plugin",
|
"plugin.source": "https://forge.thergic.ar/jose/itchio-opengamepadui-plugin",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue