Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/desktop-macos-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,27 @@ jobs:
# Public T3 Connect identifiers (Clerk publishable key, relay URL).
cp .env.example .env

- uses: ./.github/actions/setup-apt-mirrors
# PR heads from before build:desktop:bundle use the full build, which
# compiles the Linux browser secret helper and needs libsecret.
- name: Check bundle-only build support
id: bundle_build
run: |
script="$(node -p "require('./package.json').scripts['build:desktop:bundle'] ? 'build:desktop:bundle' : 'build:desktop'")"
echo "script=$script" >> "$GITHUB_OUTPUT"

- if: steps.bundle_build.outputs.script == 'build:desktop'
uses: ./.github/actions/setup-apt-mirrors

- name: Install browser secret helper build libraries
if: steps.bundle_build.outputs.script == 'build:desktop'
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config

# desktop-macos-preview-publish.yml packages this bundle as the preview channel.
# desktop-macos-preview-publish.yml packages this bundle as the preview
# channel. The Linux browser secret helper is not part of a macOS app.
- name: Build JS bundle
env:
T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && 'preview' || 'dev' }}
run: vp run build:desktop
run: vp run ${{ steps.bundle_build.outputs.script }}

# Same layout as release.yml's js-bundle so release-desktop.yml can
# package it unchanged.
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -565,22 +565,32 @@ jobs:
- name: Align package versions to release version
run: node scripts/update-release-package-versions.ts "${{ needs.preflight.outputs.version }}"

- uses: ./.github/actions/setup-apt-mirrors
# Older release refs lack build:desktop:bundle and use the full build,
# which compiles the Linux browser secret helper and needs libsecret.
- name: Check bundle-only build support
id: bundle_build
run: |
script="$(node -p "require('./package.json').scripts['build:desktop:bundle'] ? 'build:desktop:bundle' : 'build:desktop'")"
echo "script=$script" >> "$GITHUB_OUTPUT"

- if: steps.bundle_build.outputs.script == 'build:desktop'
uses: ./.github/actions/setup-apt-mirrors

# @t3tools/desktop#build compiles the Linux browser secret helper on a
# Linux host before packing, and that needs libsecret headers.
- name: Install browser secret helper build libraries
if: steps.bundle_build.outputs.script == 'build:desktop'
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev pkg-config

# Runs t3#build (which depends on @t3tools/web#build) and
# @t3tools/desktop#build, so apps/server/dist holds the server bundle
# plus the web client and apps/desktop/dist-electron the Electron main.
# Runs t3#build (which depends on @t3tools/web#build) and the desktop
# bundle, so apps/server/dist holds the server bundle plus the web client
# and apps/desktop/dist-electron the Electron main. build:desktop:bundle
# skips the Linux browser secret helper, which this artifact does not
# carry; each Linux package job compiles its own per arch.
# The release channel is already stable, nightly, or preview. Builds in
# other repositories report "dev" telemetry.
- name: Build JS bundle
env:
T3CODE_TELEMETRY_CHANNEL: ${{ github.repository == 'pingdotgg/t3code' && needs.preflight.outputs.release_channel || 'dev' }}
run: vp run build:desktop
run: vp run ${{ steps.bundle_build.outputs.script }}

# Two paths under apps/ so the artifact root is apps/; consumers download
# into `apps` to restore both at their original locations.
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export default defineConfig({
dependsOn: ["t3#build"],
cache: false,
},
// CI bundle jobs skip the Linux browser secret helper; packaging stages one per arch.
"build:bundle": {
command: "node scripts/build-preview-annotation-css.mjs && vp pack",
dependsOn: ["t3#build"],
cache: false,
},
dev: {
command:
"node scripts/build-browser-secret.mjs && node scripts/build-preview-annotation-css.mjs && cross-env T3CODE_DESKTOP_DEV=1 vp pack --watch",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"build": "vp run --filter './apps/*' build",
"build:marketing": "vp run --filter @t3tools/marketing build",
"build:desktop": "vp run --filter @t3tools/desktop --filter t3 build",
"build:desktop:bundle": "vp run --filter @t3tools/desktop build:bundle",
"build:resource-monitor": "cargo build --locked --release --manifest-path native/resource-monitor/Cargo.toml",
"typecheck": "vp run -r --cache --concurrency-limit 4 typecheck",
"tc": "vp run -r --cache --concurrency-limit 4 typecheck",
Expand Down
Loading