Skip to content
Draft
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
213 changes: 119 additions & 94 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,126 @@
name: CI

on:
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs:
reason:
description: Optional reason for manually running this disabled workflow.
required: false
type: string

permissions: {}

jobs:
check:
name: Check
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 10
disabled:
name: Disabled
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true

- name: Ensure Electron runtime is installed
run: vp run --filter @t3tools/desktop ensure:electron

- name: Check
run: vp check

- name: Typecheck
run: vpr typecheck

- name: Build desktop pipeline
run: vp run build:desktop

- name: Verify preload bundle output
- name: Explain disabled state
run: |
test -f apps/desktop/dist-electron/preload.cjs
grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs
grep -n "__clerk_internal_electron_passkeys" apps/desktop/dist-electron/preload.cjs

test:
name: Test
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true

- name: Ensure Electron runtime is installed
run: vp run --filter @t3tools/desktop ensure:electron

- name: Test
run: vp run test

mobile_native_static_analysis:
name: Mobile Native Static Analysis
runs-on: blacksmith-12vcpu-macos-26
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true

- name: Install mobile native static analysis tools
run: brew bundle install --file apps/mobile/Brewfile

- name: Lint mobile native sources
run: vp run lint:mobile

release_smoke:
name: Release Smoke
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true

- name: Exercise release-only workflow steps
run: node scripts/release-smoke.ts
echo "This workflow is intentionally manual-only."
echo "Automatic triggers were removed to prevent unwanted GitHub Actions usage."

# Previous workflow body is kept below for reference.
# Restore the relevant triggers and jobs only when this workflow should run again.
#
# name: CI
#
# on:
# pull_request:
# push:
# branches:
# - main
#
# jobs:
# check:
# name: Check
# runs-on: blacksmith-8vcpu-ubuntu-2404
# timeout-minutes: 10
# steps:
# - name: Checkout
# uses: actions/checkout@v6
#
# - name: Setup Vite+
# uses: voidzero-dev/setup-vp@v1
# with:
# node-version-file: package.json
# cache: true
# run-install: true
#
# - name: Ensure Electron runtime is installed
# run: vp run --filter @t3tools/desktop ensure:electron
#
# - name: Check
# run: vp check
#
# - name: Typecheck
# run: vpr typecheck
#
# - name: Build desktop pipeline
# run: vp run build:desktop
#
# - name: Verify preload bundle output
# run: |
# test -f apps/desktop/dist-electron/preload.cjs
# grep -nE "desktopBridge|getLocalEnvironmentBootstrap|PICK_FOLDER_CHANNEL|wsUrl" apps/desktop/dist-electron/preload.cjs
# grep -n "__clerk_internal_electron_passkeys" apps/desktop/dist-electron/preload.cjs
#
# test:
# name: Test
# runs-on: blacksmith-8vcpu-ubuntu-2404
# timeout-minutes: 10
# steps:
# - name: Checkout
# uses: actions/checkout@v6
#
# - name: Setup Vite+
# uses: voidzero-dev/setup-vp@v1
# with:
# node-version-file: package.json
# cache: true
# run-install: true
#
# - name: Ensure Electron runtime is installed
# run: vp run --filter @t3tools/desktop ensure:electron
#
# - name: Test
# run: vp run test
#
# mobile_native_static_analysis:
# name: Mobile Native Static Analysis
# runs-on: blacksmith-12vcpu-macos-26
# timeout-minutes: 10
# steps:
# - name: Checkout
# uses: actions/checkout@v6
#
# - name: Setup Vite+
# uses: voidzero-dev/setup-vp@v1
# with:
# node-version-file: package.json
# cache: true
# run-install: true
#
# - name: Install mobile native static analysis tools
# run: brew bundle install --file apps/mobile/Brewfile
#
# - name: Lint mobile native sources
# run: vp run lint:mobile
#
# release_smoke:
# name: Release Smoke
# runs-on: blacksmith-8vcpu-ubuntu-2404
# timeout-minutes: 10
# steps:
# - name: Checkout
# uses: actions/checkout@v6
#
# - name: Setup Vite+
# uses: voidzero-dev/setup-vp@v1
# with:
# node-version-file: package.json
# cache: true
# run-install: true
#
# - name: Exercise release-only workflow steps
# run: node scripts/release-smoke.ts
169 changes: 97 additions & 72 deletions .github/workflows/deploy-relay.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,105 @@
name: Deploy T3 Connect relay

on:
push:
branches:
- main
workflow_dispatch:
inputs:
reason:
description: Optional reason for manually running this disabled workflow.
required: false
type: string

permissions:
contents: read
id-token: none
statuses: write

concurrency:
group: relay-production
cancel-in-progress: false
permissions: {}

jobs:
deploy_relay:
name: Deploy production relay
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 15
environment:
name: production
env:
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
PLANETSCALE_ORGANIZATION: ${{ vars.PLANETSCALE_ORGANIZATION }}
AXIOM_ORG_ID: ${{ vars.AXIOM_ORG_ID }}
RELAY_DOMAIN: ${{ vars.RELAY_DOMAIN }}
RELAY_API_ZONE_NAME: ${{ vars.RELAY_API_ZONE_NAME }}
RELAY_TUNNEL_ZONE_NAME: ${{ vars.RELAY_TUNNEL_ZONE_NAME }}
CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
CLERK_JWT_AUDIENCE: ${{ vars.CLERK_JWT_AUDIENCE }}
APNS_ENVIRONMENT: ${{ vars.APNS_ENVIRONMENT }}
APNS_TEAM_ID: ${{ vars.APNS_TEAM_ID }}
APNS_KEY_ID: ${{ vars.APNS_KEY_ID }}
APNS_BUNDLE_ID: ${{ vars.APNS_BUNDLE_ID }}
ALCHEMY_TELEMETRY_DISABLED: "1"
disabled:
name: Disabled
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: package.json
cache: true
run-install: true

- name: Deploy production relay stage
id: deploy
run: vp run --filter t3code-relay deploy --stage prod --yes --github-output
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
PLANETSCALE_API_TOKEN_ID: ${{ secrets.PLANETSCALE_API_TOKEN_ID }}
PLANETSCALE_API_TOKEN: ${{ secrets.PLANETSCALE_API_TOKEN }}
AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
APNS_PRIVATE_KEY: ${{ secrets.APNS_PRIVATE_KEY }}

- name: Publish relay deploy commit status
uses: actions/github-script@v8
with:
script: |
const result = "${{ steps.deploy.outputs.result }}";
const changed = "${{ steps.deploy.outputs.changed }}" === "true";
const description = changed
? "Relay production deploy applied infrastructure changes."
: result === "noop"
? "Relay production deploy was a no-op."
: `Relay production deploy completed with result: ${result}.`;
- name: Explain disabled state
run: |
echo "This workflow is intentionally manual-only."
echo "Automatic triggers were removed to prevent unwanted GitHub Actions usage."

await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.sha,
state: "success",
context: "Relay deploy / production",
description,
target_url: `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
});
# Previous workflow body is kept below for reference.
# Restore the relevant triggers and jobs only when this workflow should run again.
#
# name: Deploy T3 Connect relay
#
# on:
# push:
# branches:
# - main
#
# permissions:
# contents: read
# id-token: none
# statuses: write
#
# concurrency:
# group: relay-production
# cancel-in-progress: false
#
# jobs:
# deploy_relay:
# name: Deploy production relay
# runs-on: blacksmith-8vcpu-ubuntu-2404
# timeout-minutes: 15
# environment:
# name: production
# env:
# CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
# PLANETSCALE_ORGANIZATION: ${{ vars.PLANETSCALE_ORGANIZATION }}
# AXIOM_ORG_ID: ${{ vars.AXIOM_ORG_ID }}
# RELAY_DOMAIN: ${{ vars.RELAY_DOMAIN }}
# RELAY_API_ZONE_NAME: ${{ vars.RELAY_API_ZONE_NAME }}
# RELAY_TUNNEL_ZONE_NAME: ${{ vars.RELAY_TUNNEL_ZONE_NAME }}
# CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
# CLERK_JWT_AUDIENCE: ${{ vars.CLERK_JWT_AUDIENCE }}
# APNS_ENVIRONMENT: ${{ vars.APNS_ENVIRONMENT }}
# APNS_TEAM_ID: ${{ vars.APNS_TEAM_ID }}
# APNS_KEY_ID: ${{ vars.APNS_KEY_ID }}
# APNS_BUNDLE_ID: ${{ vars.APNS_BUNDLE_ID }}
# ALCHEMY_TELEMETRY_DISABLED: "1"
# steps:
# - name: Checkout
# uses: actions/checkout@v6
#
# - name: Setup Vite+
# uses: voidzero-dev/setup-vp@v1
# with:
# node-version-file: package.json
# cache: true
# run-install: true
#
# - name: Deploy production relay stage
# id: deploy
# run: vp run --filter t3code-relay deploy --stage prod --yes --github-output
# env:
# CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# PLANETSCALE_API_TOKEN_ID: ${{ secrets.PLANETSCALE_API_TOKEN_ID }}
# PLANETSCALE_API_TOKEN: ${{ secrets.PLANETSCALE_API_TOKEN }}
# AXIOM_TOKEN: ${{ secrets.AXIOM_TOKEN }}
# CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
# APNS_PRIVATE_KEY: ${{ secrets.APNS_PRIVATE_KEY }}
#
# - name: Publish relay deploy commit status
# uses: actions/github-script@v8
# with:
# script: |
# const result = "${{ steps.deploy.outputs.result }}";
# const changed = "${{ steps.deploy.outputs.changed }}" === "true";
# const description = changed
# ? "Relay production deploy applied infrastructure changes."
# : result === "noop"
# ? "Relay production deploy was a no-op."
# : `Relay production deploy completed with result: ${result}.`;
#
# await github.rest.repos.createCommitStatus({
# owner: context.repo.owner,
# repo: context.repo.repo,
# sha: context.sha,
# state: "success",
# context: "Relay deploy / production",
# description,
# target_url: `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
# });
Loading
Loading