@@ -37,12 +37,19 @@ jobs:
3737 id : flags
3838 run : |
3939 V="${{ steps.v.outputs.version }}"
40+ # GitHub refuses to mark a prerelease as "latest" ("Drafts and prereleases
41+ # cannot be set as latest"), which would leave the rolling manifest link
42+ # 404ing for the whole alpha/beta phase — worse than losing the native
43+ # "Pre-release" badge, since it breaks Foundry's update-check flow for
44+ # anyone who installed via the latest link. Always publish as a full
45+ # release and make_latest=true; instability is called out in the body
46+ # text instead of the GitHub UI badge.
47+ echo "prerelease=false" >> "$GITHUB_OUTPUT"
48+ echo "make_latest=true" >> "$GITHUB_OUTPUT"
4049 if echo "$V" | grep -Eq -- "-(alpha|beta)\\."; then
41- echo "prerelease=true" >> "$GITHUB_OUTPUT"
42- echo "make_latest=false" >> "$GITHUB_OUTPUT"
50+ echo "unstable=true" >> "$GITHUB_OUTPUT"
4351 else
44- echo "prerelease=false" >> "$GITHUB_OUTPUT"
45- echo "make_latest=true" >> "$GITHUB_OUTPUT"
52+ echo "unstable=false" >> "$GITHUB_OUTPUT"
4653 fi
4754
4855 - name : Install deps & build
@@ -57,20 +64,19 @@ jobs:
5764 ZIP="sr3e-${VERSION}.zip"
5865
5966 MANIFEST_PINNED="${REPO}/releases/download/v${VERSION}/system.json"
67+ MANIFEST_LATEST="${REPO}/releases/latest/download/system.json"
6068 DOWNLOAD_URL="${REPO}/releases/download/v${VERSION}/${ZIP}"
6169
6270 # Pinned manifest for this exact version
6371 jq --arg ver "$VERSION" --arg manifest "$MANIFEST_PINNED" --arg download "$DOWNLOAD_URL" \
6472 '.version=$ver | .manifest=$manifest | .download=$download' system.json > system.pinned.json
6573
66- # "Latest" channel manifest — only meaningful once GitHub can actually mark this
67- # release as latest, which it refuses to do for prereleases. Skip it for
68- # alpha/beta builds instead of publishing a link that 404s.
69- if [ "${{ steps.flags.outputs.prerelease }}" = "false" ]; then
70- MANIFEST_LATEST="${REPO}/releases/latest/download/system.json"
71- jq --arg ver "$VERSION" --arg manifest "$MANIFEST_LATEST" --arg download "$DOWNLOAD_URL" \
72- '.version=$ver | .manifest=$manifest | .download=$download' system.json > system.latest.json
73- fi
74+ # "Latest" channel manifest (always points to latest release asset).
75+ # Every release is published as make_latest=true (see "Decide prerelease
76+ # + latest") specifically so this stays resolvable through alpha/beta too —
77+ # otherwise anyone installed via this URL never gets an update notification.
78+ jq --arg ver "$VERSION" --arg manifest "$MANIFEST_LATEST" --arg download "$DOWNLOAD_URL" \
79+ '.version=$ver | .manifest=$manifest | .download=$download' system.json > system.latest.json
7480
7581 - name : Package (players only)
7682 run : |
@@ -88,22 +94,27 @@ jobs:
8894 [ -d licenses ] && cp -r licenses "$ROOT/"
8995 [ -f README.md ] && cp README.md "$ROOT/"
9096 (cd package && zip -r "../sr3e-${VERSION}.zip" "sr3e")
91- # Upload "latest" manifest as a separate asset — only exists for non-prerelease builds.
92- [ -f system.latest.json ] && cp system.latest.json system.json || rm -f system.json
97+ # upload "latest" manifest as a separate asset
98+ cp system.latest.json system.json
9399
94100 - name : Compose release body
95101 id : body
96102 run : |
97103 V="${{ steps.v.outputs.version }}"
98104 {
99- if [ "${{ steps.flags.outputs.prerelease }}" = "false" ]; then
100- echo "Install/Update manifest (latest): https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/system.json"
105+ if [ "${{ steps.flags.outputs.unstable }}" = "true" ]; then
106+ echo "**⚠ Pre-release build — not marked as such in GitHub's UI so the"
107+ echo "install/update manifest link below keeps working; see notes below.**"
108+ echo
101109 fi
110+ echo "Install/Update manifest (latest): https://github.com/${GITHUB_REPOSITORY}/releases/latest/download/system.json"
102111 echo "Pinned manifest: https://github.com/${GITHUB_REPOSITORY}/releases/download/v${V}/system.json"
103112 echo
104113 if echo "$V" | grep -q -- "-alpha\\."; then
105114 echo "This is an alpha build. No migration scripts are in effect, any work done in the current"
106115 echo "system may break without warning or future fixes."
116+ elif echo "$V" | grep -q -- "-beta\\."; then
117+ echo "This is a beta build. Expect rough edges; please report anything broken."
107118 fi
108119 } > RELEASE_BODY.md
109120
@@ -119,7 +130,6 @@ jobs:
119130 system.pinned.json
120131 prerelease : ${{ steps.flags.outputs.prerelease }}
121132 make_latest : ${{ steps.flags.outputs.make_latest }}
122- # system.json is absent for prerelease builds (no "latest" manifest to ship) — don't fail on it.
123133 fail_on_unmatched_files : false
124134 env :
125135 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments