ci(gitea-sync): overlay launcher from default branch before pack

Release tags can point at commits older than launcher lib additions; building
only from the tag omitted gitea-release.js etc. Fetch default branch and
checkout tools/fractured-launcher-electron from it before npm ci/pack.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Docker Build
2026-05-10 19:15:27 -05:00
parent 6c4d7244c3
commit 15c476c12d
2 changed files with 13 additions and 2 deletions
+12 -1
View File
@@ -13,7 +13,8 @@
# Release on github.com (Releases → Draft/new release → Publish). The workflow # Release on github.com (Releases → Draft/new release → Publish). The workflow
# definition must exist on the repo DEFAULT branch (GitHub runs it from there). # definition must exist on the repo DEFAULT branch (GitHub runs it from there).
# #
# Steps: build Electron from tag → download this repos release attachments → upload all to Gitea. # Steps: build Electron using launcher sources from DEFAULT BRANCH (so tags never miss
# launcher files), checkout tag only for a consistent tree → download release attachments → Gitea.
# #
# Secrets: GITEA_BASE_URL, GITEA_TOKEN, GITEA_OWNER, GITEA_REPO # Secrets: GITEA_BASE_URL, GITEA_TOKEN, GITEA_OWNER, GITEA_REPO
# Optional variable: GITEA_TARGET_REF (see tools/fractured-launcher-electron/README.md) # Optional variable: GITEA_TARGET_REF (see tools/fractured-launcher-electron/README.md)
@@ -66,6 +67,16 @@ jobs:
with: with:
ref: ${{ needs.meta.outputs.tag }} ref: ${{ needs.meta.outputs.tag }}
# Release tags often point at server/game commits that predate launcher lib fixes.
# Always pack the launcher from default branch so app.asar includes the full tree.
- name: Overlay launcher from default branch
shell: bash
run: |
set -euo pipefail
DB="${{ github.event.repository.default_branch }}"
git fetch --no-tags --depth=1 origin "+refs/heads/${DB}:refs/remotes/origin/${DB}"
git checkout "origin/${DB}" -- tools/fractured-launcher-electron
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: '20' node-version: '20'
+1 -1
View File
@@ -75,7 +75,7 @@ First launch still copies **`default-launcher.json`** → **`launcher.json`** be
CI workflow **Sync release to Gitea** (`.github/workflows/gitea-release-sync.yml`) runs on **every published GitHub release** on this repo: CI workflow **Sync release to Gitea** (`.github/workflows/gitea-release-sync.yml`) runs on **every published GitHub release** on this repo:
1. Triggers on **release published** on **`Dawnforger/Fractured`** (or **workflow_dispatch** with a tag). 1. Triggers on **release published** on **`Dawnforger/Fractured`** (or **workflow_dispatch** with a tag).
2. Builds the **Electron** app from that tag on Windows. 2. Builds the **Electron** app on Windows using **`tools/fractured-launcher-electron` from the repo default branch** (then overlays onto the tag checkout), so older release tags never ship a launcher thats missing new **`lib/*.js`** files.
3. Downloads **all assets** attached to that **GitHub** release (MPQs, patched `Wow.exe`, etc.). 3. Downloads **all assets** attached to that **GitHub** release (MPQs, patched `Wow.exe`, etc.).
4. Merges with the built launcher artifacts and uploads everything to a **Gitea release** with the **same tag** (existing attachments on that Gitea release are replaced). 4. Merges with the built launcher artifacts and uploads everything to a **Gitea release** with the **same tag** (existing attachments on that Gitea release are replaced).