GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add tagged desktop release pipeline and unified artifact builder · FugiTech/t3code@23afddf

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • release.yml
  • README.md
  • docs
    • release.md
  • package.json
  • scripts
    • build-desktop-artifact.mjs
    • build-desktop-dmg.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/release.yml‎

Copy file name to clipboard
+180Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
name: Release Desktop
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
preflight:
13+
name: Preflight
14+
runs-on: ubuntu-24.04
15+
outputs:
16+
version: ${{ steps.version.outputs.value }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Bun
22+
uses: oven-sh/setup-bun@v2
23+
with:
24+
bun-version-file: package.json
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version-file: package.json
30+
31+
- name: Install dependencies
32+
run: bun install --frozen-lockfile
33+
34+
- name: Lint
35+
run: bun run lint
36+
37+
- name: Typecheck
38+
run: bun run typecheck
39+
40+
- name: Test
41+
run: bun run test
42+
43+
- id: version
44+
name: Resolve release version
45+
run: echo "value=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
46+
47+
build:
48+
name: Build ${{ matrix.label }}
49+
needs: preflight
50+
runs-on: ${{ matrix.runner }}
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
include:
55+
- label: macOS arm64
56+
runner: macos-14
57+
platform: mac
58+
target: dmg
59+
arch: arm64
60+
- label: macOS x64
61+
runner: macos-13
62+
platform: mac
63+
target: dmg
64+
arch: x64
65+
- label: Linux x64
66+
runner: ubuntu-24.04
67+
platform: linux
68+
target: AppImage
69+
arch: x64
70+
- label: Windows x64
71+
runner: windows-2022
72+
platform: win
73+
target: nsis
74+
arch: x64
75+
steps:
76+
- name: Checkout
77+
uses: actions/checkout@v4
78+
79+
- name: Setup Bun
80+
uses: oven-sh/setup-bun@v2
81+
with:
82+
bun-version-file: package.json
83+
84+
- name: Setup Node
85+
uses: actions/setup-node@v4
86+
with:
87+
node-version-file: package.json
88+
89+
- name: Install dependencies
90+
run: bun install --frozen-lockfile
91+
92+
- name: Build desktop artifact
93+
shell: bash
94+
env:
95+
CSC_LINK: ${{ secrets.CSC_LINK }}
96+
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
97+
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
98+
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
99+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
100+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
101+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
102+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
103+
AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
104+
AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
105+
AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
106+
AZURE_TRUSTED_SIGNING_PUBLISHER_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_PUBLISHER_NAME }}
107+
run: |
108+
args=(
109+
--platform "${{ matrix.platform }}"
110+
--target "${{ matrix.target }}"
111+
--arch "${{ matrix.arch }}"
112+
--version "${{ needs.preflight.outputs.version }}"
113+
)
114+
115+
has_all() {
116+
for value in "$@"; do
117+
if [[ -z "$value" ]]; then
118+
return 1
119+
fi
120+
done
121+
return 0
122+
}
123+
124+
if [[ "${{ matrix.platform }}" == "mac" ]]; then
125+
if has_all "$CSC_LINK" "$CSC_KEY_PASSWORD" "$APPLE_API_KEY" "$APPLE_API_KEY_ID" "$APPLE_API_ISSUER"; then
126+
key_path="$RUNNER_TEMP/AuthKey_${APPLE_API_KEY_ID}.p8"
127+
printf '%s' "$APPLE_API_KEY" > "$key_path"
128+
export APPLE_API_KEY="$key_path"
129+
echo "macOS signing enabled."
130+
args+=(--signed)
131+
else
132+
echo "macOS signing disabled (missing one or more Apple signing secrets)."
133+
fi
134+
elif [[ "${{ matrix.platform }}" == "win" ]]; then
135+
if has_all \
136+
"$AZURE_TENANT_ID" \
137+
"$AZURE_CLIENT_ID" \
138+
"$AZURE_CLIENT_SECRET" \
139+
"$AZURE_TRUSTED_SIGNING_ENDPOINT" \
140+
"$AZURE_TRUSTED_SIGNING_ACCOUNT_NAME" \
141+
"$AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME" \
142+
"$AZURE_TRUSTED_SIGNING_PUBLISHER_NAME"; then
143+
echo "Windows signing enabled (Azure Trusted Signing)."
144+
args+=(--signed)
145+
else
146+
echo "Windows signing disabled (missing one or more Azure Trusted Signing secrets)."
147+
fi
148+
else
149+
echo "Signing disabled for ${{ matrix.platform }}."
150+
fi
151+
152+
bun run dist:desktop:artifact -- "${args[@]}"
153+
154+
- name: Upload build artifacts
155+
uses: actions/upload-artifact@v4
156+
with:
157+
name: desktop-${{ matrix.platform }}-${{ matrix.arch }}
158+
path: release/*
159+
if-no-files-found: error
160+
161+
release:
162+
name: Publish GitHub Release
163+
needs: [preflight, build]
164+
runs-on: ubuntu-24.04
165+
steps:
166+
- name: Download all desktop artifacts
167+
uses: actions/download-artifact@v4
168+
with:
169+
pattern: desktop-*
170+
merge-multiple: true
171+
path: release-assets
172+
173+
- name: Publish release
174+
uses: softprops/action-gh-release@v2
175+
with:
176+
tag_name: ${{ github.ref_name }}
177+
name: T3 Code v${{ needs.preflight.outputs.version }}
178+
generate_release_notes: true
179+
files: release-assets/*
180+
fail_on_unmatched_files: true
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ npx t3
7575
- `bun run build` — Builds contracts, web app, and server through Turbo.
7676
- `bun run typecheck` — Strict TypeScript checks for all packages.
7777
- `bun run test` — Runs workspace tests.
78+
- `bun run dist:desktop:artifact -- --platform <mac|linux|win> --target <target> --arch <arch>` — Builds a desktop artifact for a specific platform/target/arch.
7879
- `bun run dist:desktop:dmg` — Builds a shareable macOS `.dmg` into `./release`.
7980
- `bun run dist:desktop:dmg:x64` — Builds an Intel macOS `.dmg`.
81+
- `bun run dist:desktop:linux` — Builds a Linux AppImage into `./release`.
82+
- `bun run dist:desktop:win` — Builds a Windows NSIS installer into `./release`.
8083

8184
### Desktop `.dmg` packaging notes
8285

@@ -86,6 +89,12 @@ npx t3
8689
- Desktop packaging includes `apps/server/dist` (the `t3` backend) and starts it on loopback with an auth token for WebSocket/API traffic.
8790
- Your tester can still open it on macOS by right-clicking the app and choosing **Open** on first launch.
8891
- To keep staging files for debugging package contents, run: `bun run dist:desktop:dmg -- --keep-stage`
92+
- To allow code-signing/notarization when configured in CI/secrets, add: `--signed`.
93+
- Windows `--signed` uses Azure Trusted Signing and expects:
94+
`AZURE_TRUSTED_SIGNING_ENDPOINT`, `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`,
95+
`AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`, and `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`.
96+
- Azure authentication env vars are also required (for example service principal with secret):
97+
`AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`.
8998

9099
### Running multiple dev instances
91100

@@ -122,3 +131,6 @@ Codex is the only implemented provider. `claudeCode` is reserved in contracts/UI
122131
## CI quality gates
123132

124133
- `.github/workflows/ci.yml` runs `bun run lint`, `bun run typecheck`, and `bun run test` on pull requests and pushes to `main`.
134+
- `.github/workflows/release.yml` builds macOS (`arm64` and `x64`), Linux (`x64`), and Windows (`x64`) desktop artifacts from a single `v*.*.*` tag and publishes one GitHub release.
135+
- The release workflow auto-enables signing only when secrets are present: Apple credentials for macOS and Azure Trusted Signing credentials for Windows. Without secrets, it still releases unsigned artifacts.
136+
- See `docs/release.md` for full release/signing setup checklist.
Collapse file

‎docs/release.md‎

Copy file name to clipboard
+105Lines changed: 105 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Release Checklist
2+
3+
This document covers how to run desktop releases from one tag, first without signing, then with signing.
4+
5+
## What the workflow does
6+
7+
- Trigger: push tag matching `v*.*.*`.
8+
- Runs quality gates first: lint, typecheck, test.
9+
- Builds four artifacts in parallel:
10+
- macOS `arm64` DMG
11+
- macOS `x64` DMG
12+
- Linux `x64` AppImage
13+
- Windows `x64` NSIS installer
14+
- Publishes one GitHub Release with all produced files.
15+
- Signing is optional and auto-detected per platform from secrets.
16+
17+
## 1) Dry-run release without signing
18+
19+
Use this first to validate the release pipeline.
20+
21+
1. Confirm no signing secrets are required for this test.
22+
2. Create a test tag:
23+
- `git tag v0.0.0-test.1`
24+
- `git push origin v0.0.0-test.1`
25+
3. Wait for `.github/workflows/release.yml` to finish.
26+
4. Verify the GitHub Release contains all platform artifacts.
27+
5. Download each artifact and sanity-check installation on each OS.
28+
29+
## 2) Apple signing + notarization setup (macOS)
30+
31+
Required secrets used by the workflow:
32+
33+
- `CSC_LINK`
34+
- `CSC_KEY_PASSWORD`
35+
- `APPLE_API_KEY`
36+
- `APPLE_API_KEY_ID`
37+
- `APPLE_API_ISSUER`
38+
39+
Checklist:
40+
41+
1. Apple Developer account access:
42+
- Team has rights to create Developer ID certificates.
43+
2. Create `Developer ID Application` certificate.
44+
3. Export certificate + private key as `.p12` from Keychain.
45+
4. Base64-encode the `.p12` and store as `CSC_LINK`.
46+
5. Store the `.p12` export password as `CSC_KEY_PASSWORD`.
47+
6. In App Store Connect, create an API key (Team key).
48+
7. Add API key values:
49+
- `APPLE_API_KEY`: contents of the downloaded `.p8`
50+
- `APPLE_API_KEY_ID`: Key ID
51+
- `APPLE_API_ISSUER`: Issuer ID
52+
8. Re-run a tag release and confirm macOS artifacts are signed/notarized.
53+
54+
Notes:
55+
56+
- `APPLE_API_KEY` is stored as raw key text in secrets.
57+
- The workflow writes it to a temporary `AuthKey_<id>.p8` file at runtime.
58+
59+
## 3) Azure Trusted Signing setup (Windows)
60+
61+
Required secrets used by the workflow:
62+
63+
- `AZURE_TENANT_ID`
64+
- `AZURE_CLIENT_ID`
65+
- `AZURE_CLIENT_SECRET`
66+
- `AZURE_TRUSTED_SIGNING_ENDPOINT`
67+
- `AZURE_TRUSTED_SIGNING_ACCOUNT_NAME`
68+
- `AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME`
69+
- `AZURE_TRUSTED_SIGNING_PUBLISHER_NAME`
70+
71+
Checklist:
72+
73+
1. Create Azure Trusted Signing account and certificate profile.
74+
2. Record ATS values:
75+
- Endpoint
76+
- Account name
77+
- Certificate profile name
78+
- Publisher name
79+
3. Create/choose an Entra app registration (service principal).
80+
4. Grant service principal permissions required by Trusted Signing.
81+
5. Create a client secret for the service principal.
82+
6. Add Azure secrets listed above in GitHub Actions secrets.
83+
7. Re-run a tag release and confirm Windows installer is signed.
84+
85+
## 4) Ongoing release checklist
86+
87+
1. Ensure `main` is green in CI.
88+
2. Bump app version as needed.
89+
3. Create release tag: `vX.Y.Z`.
90+
4. Push tag.
91+
5. Verify workflow steps:
92+
- preflight passes
93+
- all matrix builds pass
94+
- release job uploads expected files
95+
6. Smoke test downloaded artifacts.
96+
97+
## 5) Troubleshooting
98+
99+
- macOS build unsigned when expected signed:
100+
- Check all Apple secrets are populated and non-empty.
101+
- Windows build unsigned when expected signed:
102+
- Check all Azure ATS and auth secrets are populated and non-empty.
103+
- Build fails with signing error:
104+
- Retry with secrets removed to confirm unsigned path still works.
105+
- Re-check certificate/profile names and tenant/client credentials.
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@
2929
"test:desktop-smoke": "turbo run smoke-test --filter=@t3tools/desktop",
3030
"fmt": "oxfmt",
3131
"build:contracts": "turbo run build --filter=@t3tools/contracts",
32-
"dist:desktop:dmg": "node scripts/build-desktop-dmg.mjs",
33-
"dist:desktop:dmg:arm64": "node scripts/build-desktop-dmg.mjs --arch arm64",
34-
"dist:desktop:dmg:x64": "node scripts/build-desktop-dmg.mjs --arch x64",
32+
"dist:desktop:artifact": "node scripts/build-desktop-artifact.mjs",
33+
"dist:desktop:dmg": "node scripts/build-desktop-artifact.mjs --platform mac --target dmg",
34+
"dist:desktop:dmg:arm64": "node scripts/build-desktop-artifact.mjs --platform mac --target dmg --arch arm64",
35+
"dist:desktop:dmg:x64": "node scripts/build-desktop-artifact.mjs --platform mac --target dmg --arch x64",
36+
"dist:desktop:linux": "node scripts/build-desktop-artifact.mjs --platform linux --target AppImage --arch x64",
37+
"dist:desktop:win": "node scripts/build-desktop-artifact.mjs --platform win --target nsis --arch x64",
3538
"clean": "rm -rf node_modules apps/*/node_modules packages/*/node_modules apps/*/dist apps/*/dist-electron packages/*/dist .turbo apps/*/.turbo packages/*/.turbo",
3639
"sync:vscode-icons": "node scripts/sync-vscode-icons.mjs"
3740
},

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.