Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
1fa3f4f855
|
|||
| a7cbfc8b70 | |||
| 0a48f764f6 | |||
| bed08c6c44 | |||
| 2a924ea8a3 |
@@ -1,6 +1,6 @@
|
||||
name: Release
|
||||
|
||||
# Packs the mod into an installable .zip and publishes it as a GitHub Release,
|
||||
# Packs the mod into an installable .zip and publishes it as a Gitea Release,
|
||||
# once per push to main.
|
||||
#
|
||||
# Archive layout: every mod file at the archive root, manifest.json included.
|
||||
@@ -24,10 +24,10 @@ name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
branches: [master, dev]
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
- '**.md'
|
||||
- ".gitea/**"
|
||||
- "**.md"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
@@ -113,7 +113,7 @@ jobs:
|
||||
|
||||
- name: Refuse to clobber an existing release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GITEA_TOKEN: ${{ github.token }}
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -121,7 +121,13 @@ jobs:
|
||||
echo "::error::Tag $TAG already exists. Pick a different version."
|
||||
exit 1
|
||||
fi
|
||||
if gh release view "$TAG" >/dev/null 2>&1; then
|
||||
|
||||
# Replaced `gh release view` with a direct HTTP check to the Gitea API
|
||||
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/tags/$TAG")
|
||||
|
||||
if [ "$HTTP_STATUS" -eq 200 ]; then
|
||||
echo "::error::Release $TAG already exists. Pick a different version."
|
||||
exit 1
|
||||
fi
|
||||
@@ -164,16 +170,16 @@ jobs:
|
||||
with open(path, encoding="utf-8") as fh:
|
||||
version = json.load(fh)["version"]
|
||||
if version != expected:
|
||||
raise SystemExit(f"::error::packed manifest says {version}, expected {expected}")
|
||||
raise SystemExit(f":error::packed manifest says {version}, expected {expected}")
|
||||
print(f"manifest.json is at the archive root and reports {version}")
|
||||
PY
|
||||
|
||||
(cd "$out" && sha256sum "${MOD_ID}"-*.zip > sha256sums.txt)
|
||||
cat "$out/sha256sums.txt"
|
||||
|
||||
- name: Publish GitHub Release
|
||||
- name: Publish Gitea Release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GITEA_TOKEN: ${{ github.token }}
|
||||
VERSION: ${{ steps.ver.outputs.version }}
|
||||
TAG: ${{ steps.ver.outputs.tag }}
|
||||
MOD_ID: "DRAMATIC_SHAPE"
|
||||
@@ -190,11 +196,34 @@ jobs:
|
||||
fi
|
||||
printf 'Release notes:\n%s\n' "$notes"
|
||||
|
||||
gh release create "$TAG" \
|
||||
--target "$GITHUB_SHA" \
|
||||
--title "$VERSION" \
|
||||
--notes "$notes" \
|
||||
"dist/${MOD_ID}-${VERSION}.zip" \
|
||||
"dist/sha256sums.txt"
|
||||
# Create the release via Gitea's REST API
|
||||
RESPONSE=$(curl -s -X POST "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$(jq -n \
|
||||
--arg tag "$TAG" \
|
||||
--arg target "$GITHUB_SHA" \
|
||||
--arg name "$VERSION" \
|
||||
--arg body "$notes" \
|
||||
'{tag_name: $tag, target_commitish: $target, name: $name, body: $body}')"
|
||||
)
|
||||
|
||||
# Extract the numeric release ID needed to upload assets
|
||||
RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')
|
||||
|
||||
if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then
|
||||
echo "::error::Failed to create release. Gitea responded with: $RESPONSE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upload the Mod .zip asset to the newly created release
|
||||
curl -s -f -X POST "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID/assets" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-F "attachment=@dist/${MOD_ID}-${VERSION}.zip"
|
||||
|
||||
# Upload the sha256sums.txt file
|
||||
curl -s -f -X POST "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID/assets" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-F "attachment=@dist/sha256sums.txt"
|
||||
|
||||
echo "Published release $TAG"
|
||||
+8
-1
@@ -89,7 +89,14 @@ local SHADER = [[
|
||||
varying vec3 vSun; // this fragment's place in the sun's view
|
||||
varying float vFog; // how deep into the map's haze it stands
|
||||
varying float vFirefly; // zero normally, night glow on firefly cards
|
||||
uniform float fireflyNight; // shared safely by vertex and pixel stages
|
||||
// Explicitly qualified, and it has to be: an unqualified float takes each
|
||||
// STAGE's default precision, and those do not agree -- highp in the vertex
|
||||
// stage, mediump in the fragment one. LOVE 11 linked the pair anyway;
|
||||
// LOVE 12 holds both declarations to the same qualifier and refuses the
|
||||
// whole shader over it, which costs the entire 3D pass -- Voxel3D.available()
|
||||
// is a shader that compiled, and the overworld falls back to flat 2D with
|
||||
// nothing said anywhere. Same macro the varyings below already use.
|
||||
uniform LOVE_HIGHP_OR_MEDIUMP float fireflyNight;
|
||||
#ifdef VOXEL_CULL
|
||||
// where this fragment stands in the FLAT world, for the diorama's
|
||||
// viewport to measure. Same precision reasoning as vGrid below: a
|
||||
|
||||
Reference in New Issue
Block a user