Merge pull request 'Release workflow: upload through the public URL again; smaller jars' (#14) from release-public-url into master
Release / build (release) Successful in 18m36s
Release / build (release) Successful in 18m36s
This commit was merged in pull request #14.
This commit is contained in:
@@ -21,9 +21,9 @@ permissions:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
TAG: ${{ github.event.release.tag_name || inputs.tag }}
|
TAG: ${{ github.event.release.tag_name || inputs.tag }}
|
||||||
# Gitea's internal address. Uploads bypass the Cloudflare tunnel, which
|
# The public address. Uploads go through the Cloudflare tunnel, which caps
|
||||||
# rejects request bodies as large as the mod jars (413).
|
# request bodies at 100 MB, so each mod jar must stay under that.
|
||||||
GITEA_API: http://gitea:3000/api/v1
|
GITEA_API: ${{ github.server_url }}/api/v1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -69,6 +69,15 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cloudflare in front of the server rejects uploads of 100 MB or more.
|
||||||
|
for jar in "${jars[@]}"; do
|
||||||
|
size=$(stat -c%s "$jar")
|
||||||
|
if [ "$size" -ge 100000000 ]; then
|
||||||
|
echo "::error::$(basename "$jar") is $((size / 1000000)) MB; uploads must be under 100 MB. Check what's taking space with: unzip -l \"$jar\" | sort -n" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# Look the release up by tag so manual runs work too.
|
# Look the release up by tag so manual runs work too.
|
||||||
RELEASE_ID="$(curl --fail-with-body -sS -H "Authorization: token $TOKEN" \
|
RELEASE_ID="$(curl --fail-with-body -sS -H "Authorization: token $TOKEN" \
|
||||||
"$GITEA_API/repos/$REPO/releases/tags/$TAG" \
|
"$GITEA_API/repos/$REPO/releases/tags/$TAG" \
|
||||||
|
|||||||
+1
-1
Submodule common updated: 98da42992e...5df42e2b7c
Reference in New Issue
Block a user