diff --git a/.github/workflows/gitea-release-sync.yml b/.github/workflows/gitea-release-sync.yml index dd8f571..3032d74 100644 --- a/.github/workflows/gitea-release-sync.yml +++ b/.github/workflows/gitea-release-sync.yml @@ -13,7 +13,8 @@ # Release on github.com (Releases → Draft/new release → Publish). The workflow # definition must exist on the repo DEFAULT branch (GitHub runs it from there). # -# Steps: build Electron from tag → download this repo’s 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 # Optional variable: GITEA_TARGET_REF (see tools/fractured-launcher-electron/README.md) @@ -66,6 +67,16 @@ jobs: with: 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 with: node-version: '20' diff --git a/tools/fractured-launcher-electron/README.md b/tools/fractured-launcher-electron/README.md index 541ee11..823f4f4 100644 --- a/tools/fractured-launcher-electron/README.md +++ b/tools/fractured-launcher-electron/README.md @@ -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: 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 that’s missing new **`lib/*.js`** files. 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).