Skip to content

Commit f72fd8c

Browse files
t3dotggclaude
andcommitted
ci(release): older refs keep the full desktop build
Release and macOS preview bundle jobs can check out a ref from before build:desktop:bundle existed. Those refs now install libsecret and run build:desktop as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a9930c3 commit f72fd8c

2 files changed

Lines changed: 37 additions & 7 deletions

File tree

‎.github/workflows/desktop-macos-preview.yml‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,27 @@ jobs:
7373
# Public T3 Connect identifiers (Clerk publishable key, relay URL).
7474
cp .env.example .env
7575
76+
# PR heads from before build:desktop:bundle use the full build, which
77+
# compiles the Linux browser secret helper and needs libsecret.
78+
- name: Check bundle-only build support
79+
id: bundle_build
80+
run: |
81+
script="$(node -p "require('./package.json').scripts['build:desktop:bundle'] ? 'build:desktop:bundle' : 'build:desktop'")"
82+
echo "script=$script" >> "$GITHUB_OUTPUT"
83+
84+
- if: steps.bundle_build.outputs.script == 'build:desktop'
85+
uses: ./.github/actions/setup-apt-mirrors
86+
87+
- name: Install browser secret helper build libraries
88+
if: steps.bundle_build.outputs.script == 'build:desktop'
89+
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
90+
7691
# desktop-macos-preview-publish.yml packages this bundle as the preview
7792
# channel. The Linux browser secret helper is not part of a macOS app.
7893
- name: Build JS bundle
7994
env:
8095
T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && 'preview' || 'dev' }}
81-
run: vp run build:desktop:bundle
96+
run: vp run ${{ steps.bundle_build.outputs.script }}
8297

8398
# Same layout as release.yml's js-bundle so release-desktop.yml can
8499
# package it unchanged.

‎.github/workflows/release.yml‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,17 +565,32 @@ jobs:
565565
- name: Align package versions to release version
566566
run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"
567567

568-
# Runs t3#build (which depends on @t3tools/web#build) and
569-
# @t3tools/desktop#build:bundle, so apps/server/dist holds the server
570-
# bundle plus the web client and apps/desktop/dist-electron the Electron
571-
# main. It skips the Linux browser secret helper, which this artifact
572-
# does not carry; each Linux package job compiles its own per arch.
568+
# Older release refs lack build:desktop:bundle and use the full build,
569+
# which compiles the Linux browser secret helper and needs libsecret.
570+
- name: Check bundle-only build support
571+
id: bundle_build
572+
run: |
573+
script="$(node -p "require('./package.json').scripts['build:desktop:bundle'] ? 'build:desktop:bundle' : 'build:desktop'")"
574+
echo "script=$script" >> "$GITHUB_OUTPUT"
575+
576+
- if: steps.bundle_build.outputs.script == 'build:desktop'
577+
uses: ./.github/actions/setup-apt-mirrors
578+
579+
- name: Install browser secret helper build libraries
580+
if: steps.bundle_build.outputs.script == 'build:desktop'
581+
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config
582+
583+
# Runs t3#build (which depends on @t3tools/web#build) and the desktop
584+
# bundle, so apps/server/dist holds the server bundle plus the web client
585+
# and apps/desktop/dist-electron the Electron main. build:desktop:bundle
586+
# skips the Linux browser secret helper, which this artifact does not
587+
# carry; each Linux package job compiles its own per arch.
573588
# The release channel is already stable, nightly, or preview. Builds in
574589
# other repositories report "dev" telemetry.
575590
- name: Build JS bundle
576591
env:
577592
T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && needs.preflight.outputs.release_channel || 'dev' }}
578-
run: vp run build:desktop:bundle
593+
run: vp run ${{ steps.bundle_build.outputs.script }}
579594

580595
# Two paths under apps/ so the artifact root is apps/; consumers download
581596
# into `apps` to restore both at their original locations.

0 commit comments

Comments
 (0)