From e4f78dd1ecc0173e02e73a5cd175064f355a86b2 Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Tue, 13 Jan 2026 02:57:31 +0000 Subject: [PATCH] docs: Add desktop app release process to copilot instructions, auto-publish workflow --- .github/copilot-instructions.md | 39 ++++++++++ .github/workflows/electron-release.yml | 78 +++++++++++++++++--- .github/workflows/performance-tests.yml | 64 ---------------- .github/workflows/spiderlily-daily-build.yml | 61 --------------- modes/copilot-instructions.md | 39 ++++++++++ modes/workflows/electron-release.yml | 15 ++-- 6 files changed, 156 insertions(+), 140 deletions(-) delete mode 100644 .github/workflows/performance-tests.yml delete mode 100644 .github/workflows/spiderlily-daily-build.yml diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e1d880684..722c8dbdd 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -295,6 +295,45 @@ The CDP tunnel forwards localhost:9333 to host's VS Code for remote control: - **`ac-cdp-status`** — check if tunnel is running and port accessible - Artery TUI header shows CDP status (● online / ○ offline) +## Desktop App Releases 🖥️ + +The Electron desktop app lives in `ac-electron/`. When user says **"build and release the desktop app"**: + +### Full Release Process +```bash +# 1. Bump version in package.json +cd ac-electron +# Edit package.json version (e.g., 0.1.11 -> 0.1.12) + +# 2. Commit changes +git add ac-electron/ +git commit -m "v0.1.12: Description of changes" + +# 3. Tag and push (triggers GitHub Actions build) +git tag v0.1.12 +git push origin main +git push origin v0.1.12 + +# 4. Wait for build (~5 min), then verify +gh run list --workflow=electron-release.yml --limit 1 + +# 5. Verify release is published (not draft) +gh release view v0.1.12 +``` + +### Key Files +- **Main process**: `ac-electron/main.js` +- **Renderers**: `ac-electron/renderer/flip-view.html` (main), `development.html` +- **Preload**: `ac-electron/preload.js` +- **Build config**: `ac-electron/package.json` (electron-builder section) +- **Workflow**: `.github/workflows/electron-release.yml` + +### Notes +- Workflow uses `--publish always` — releases are published automatically (not drafts) +- Auto-updater yml files (`latest-mac.yml`, `latest.yml`, `latest-linux.yml`) are generated +- The app does NOT stop the devcontainer on quit — it keeps running for VS Code +- `+` in prompt opens new window, `-` closes current window + ## KidLisp.com Development 🎨 ### Quick Start (Artery TUI) diff --git a/.github/workflows/electron-release.yml b/.github/workflows/electron-release.yml index 72dcf2bac..60006e9d9 100644 --- a/.github/workflows/electron-release.yml +++ b/.github/workflows/electron-release.yml @@ -5,12 +5,15 @@ on: tags: - 'v*' workflow_dispatch: + inputs: + version: + description: 'Version to release (e.g., 0.1.8)' + required: false + default: '' jobs: build-macos: runs-on: macos-latest - permissions: - contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -31,16 +34,24 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build and Publish macOS (universal) + - name: Build macOS (universal) and publish working-directory: ac-electron run: npx electron-builder --mac --universal --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload macOS artifacts + uses: actions/upload-artifact@v4 + with: + name: macos-build + path: | + ac-electron/dist/*.dmg + ac-electron/dist/*.zip + ac-electron/dist/latest-mac.yml + retention-days: 5 + build-windows: runs-on: windows-latest - permissions: - contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -56,16 +67,23 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build and Publish Windows + - name: Build Windows and publish working-directory: ac-electron run: npx electron-builder --win --x64 --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Windows artifacts + uses: actions/upload-artifact@v4 + with: + name: windows-build + path: | + ac-electron/dist/*.exe + ac-electron/dist/latest.yml + retention-days: 5 + build-linux: runs-on: ubuntu-latest - permissions: - contents: write steps: - name: Checkout uses: actions/checkout@v4 @@ -81,8 +99,50 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build and Publish Linux + - name: Build Linux and publish working-directory: ac-electron run: npx electron-builder --linux --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Linux artifacts + uses: actions/upload-artifact@v4 + with: + name: linux-build + path: | + ac-electron/dist/*.AppImage + ac-electron/dist/*.deb + ac-electron/dist/*.rpm + ac-electron/dist/latest-linux.yml + retention-days: 5 + + release: + needs: [build-macos, build-windows, build-linux] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + permissions: + contents: write + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: List artifacts + run: find artifacts -type f -name "*" + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: | + artifacts/macos-build/*.dmg + artifacts/macos-build/*.zip + artifacts/windows-build/*.exe + artifacts/linux-build/*.AppImage + artifacts/linux-build/*.deb + artifacts/linux-build/*.rpm + draft: false + prerelease: false + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.yml deleted file mode 100644 index ef7baed34..000000000 --- a/.github/workflows/performance-tests.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Performance Testing - -on: - push: - branches: [main] - pull_request: - branches: [main] - workflow_dispatch: - -jobs: - performance-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run basic performance tests - run: npm run test:perf - - - name: Run Chrome DevTools performance tests - run: npm run test:perf:chrome - env: - TEST_URL: https://localhost:8888 - RUN_LIGHTHOUSE: false - - - name: Upload performance reports - uses: actions/upload-artifact@v4 - if: always() - with: - name: performance-reports - path: tests/performance/reports/ - retention-days: 30 - - - name: Comment PR with results - if: github.event_name == 'pull_request' - uses: actions/github-script@v7 - with: - script: | - const fs = require('fs'); - const reports = fs.readdirSync('tests/performance/reports/'); - - if (reports.length > 0) { - const comment = `## 🚀 Performance Test Results - - Performance tests completed! Check the artifacts for detailed reports. - - ✅ Tests passed`; - - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: comment - }); - } diff --git a/.github/workflows/spiderlily-daily-build.yml b/.github/workflows/spiderlily-daily-build.yml deleted file mode 100644 index e7b7e02d9..000000000 --- a/.github/workflows/spiderlily-daily-build.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Spider Lily Daily Build - -on: - # Run daily at 2 AM UTC (adjust timezone as needed) - schedule: - - cron: '0 2 * * *' - - # Allow manual trigger from GitHub UI - workflow_dispatch: - inputs: - package: - description: 'Package for distribution' - required: false - type: boolean - default: false - upload: - description: 'Upload to cloud storage' - required: false - type: boolean - default: false - -jobs: - build: - name: Build Spider Lily - runs-on: self-hosted # Uses the VM we set up - - steps: - - name: Load secrets - shell: pwsh - run: | - # Load Perforce credentials from environment - $env:P4PORT = "${{ secrets.P4_SERVER }}" - $env:P4USER = "${{ secrets.P4_USER }}" - $env:P4PASSWD = "${{ secrets.P4_PASSWORD }}" - $env:P4CLIENT = "${{ secrets.P4_WORKSPACE }}" - - # Verify connection - p4 info - - - name: Run daily build - shell: pwsh - run: | - $packageFlag = if ("${{ github.event.inputs.package }}" -eq "true") { "-Package" } else { "" } - $uploadFlag = if ("${{ github.event.inputs.upload }}" -eq "true") { "-Upload" } else { "" } - - & "C:\scripts\daily-build.ps1" $packageFlag $uploadFlag - - - name: Upload build artifacts - if: success() - uses: actions/upload-artifact@v4 - with: - name: spiderlily-build-${{ github.run_number }} - path: C:\Builds\*\BUILD_INFO.txt - retention-days: 30 - - - name: Notify on failure - if: failure() - shell: pwsh - run: | - Write-Host "Build failed! Check the logs for details." - # TODO: Add notification to Discord/Slack/email diff --git a/modes/copilot-instructions.md b/modes/copilot-instructions.md index e1d880684..722c8dbdd 100644 --- a/modes/copilot-instructions.md +++ b/modes/copilot-instructions.md @@ -295,6 +295,45 @@ The CDP tunnel forwards localhost:9333 to host's VS Code for remote control: - **`ac-cdp-status`** — check if tunnel is running and port accessible - Artery TUI header shows CDP status (● online / ○ offline) +## Desktop App Releases 🖥️ + +The Electron desktop app lives in `ac-electron/`. When user says **"build and release the desktop app"**: + +### Full Release Process +```bash +# 1. Bump version in package.json +cd ac-electron +# Edit package.json version (e.g., 0.1.11 -> 0.1.12) + +# 2. Commit changes +git add ac-electron/ +git commit -m "v0.1.12: Description of changes" + +# 3. Tag and push (triggers GitHub Actions build) +git tag v0.1.12 +git push origin main +git push origin v0.1.12 + +# 4. Wait for build (~5 min), then verify +gh run list --workflow=electron-release.yml --limit 1 + +# 5. Verify release is published (not draft) +gh release view v0.1.12 +``` + +### Key Files +- **Main process**: `ac-electron/main.js` +- **Renderers**: `ac-electron/renderer/flip-view.html` (main), `development.html` +- **Preload**: `ac-electron/preload.js` +- **Build config**: `ac-electron/package.json` (electron-builder section) +- **Workflow**: `.github/workflows/electron-release.yml` + +### Notes +- Workflow uses `--publish always` — releases are published automatically (not drafts) +- Auto-updater yml files (`latest-mac.yml`, `latest.yml`, `latest-linux.yml`) are generated +- The app does NOT stop the devcontainer on quit — it keeps running for VS Code +- `+` in prompt opens new window, `-` closes current window + ## KidLisp.com Development 🎨 ### Quick Start (Artery TUI) diff --git a/modes/workflows/electron-release.yml b/modes/workflows/electron-release.yml index 1d64dbb22..60006e9d9 100644 --- a/modes/workflows/electron-release.yml +++ b/modes/workflows/electron-release.yml @@ -34,9 +34,9 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build macOS (universal) + - name: Build macOS (universal) and publish working-directory: ac-electron - run: npx electron-builder --mac --universal + run: npx electron-builder --mac --universal --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -47,6 +47,7 @@ jobs: path: | ac-electron/dist/*.dmg ac-electron/dist/*.zip + ac-electron/dist/latest-mac.yml retention-days: 5 build-windows: @@ -66,9 +67,9 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build Windows + - name: Build Windows and publish working-directory: ac-electron - run: npx electron-builder --win --x64 + run: npx electron-builder --win --x64 --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -78,6 +79,7 @@ jobs: name: windows-build path: | ac-electron/dist/*.exe + ac-electron/dist/latest.yml retention-days: 5 build-linux: @@ -97,9 +99,9 @@ jobs: working-directory: ac-electron run: npm ci - - name: Build Linux + - name: Build Linux and publish working-directory: ac-electron - run: npx electron-builder --linux + run: npx electron-builder --linux --publish always env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -111,6 +113,7 @@ jobs: ac-electron/dist/*.AppImage ac-electron/dist/*.deb ac-electron/dist/*.rpm + ac-electron/dist/latest-linux.yml retention-days: 5 release: -- 2.51.2