GitHub Actions Release Workflow Fix Implementation Plan
Problem Statement
The GitHub Actions release workflows are failing across multiple platforms (Linux, macOS, Windows) preventing successful builds and releases. The issues include:
- 1Password CLI installation failures on Windows
- Svelte/Vite build errors in the Tauri desktop app
- Docker multi-architecture build failures
- Cross-compilation issues for different architectures
- Missing or incorrect configuration for Debian package builds
Current State Analysis
Failed Workflows
-
publish-tauri.yml (Last run: 19119603861)
- Windows: 1Password CLI installation fails with "No such file or directory"
- Ubuntu/macOS: Svelte build fails with CSS identifier error in
node_modules/svelma/src/components/Tooltip.svelte
-
release-comprehensive.yml (Last run: 19078632924)
- Windows: PowerShell parser error during Rust installation
- Ubuntu 22.04: yarn cache dependency resolution failure
- Docker 24.04: Missing
/desktop/yarn.lockfile
Project Structure
- Main workspace:
/Users/alex/projects/terraphim/terraphim-ai/Cargo.toml - Server binary:
terraphim_server(path:terraphim_server/) - TUI binary:
terraphim_tui(path:crates/terraphim_tui/) - Desktop app:
terraphim-ai-desktop(path:desktop/src-tauri/) - Docker builds: Multi-arch support for Ubuntu 18.04, 20.04, 22.04, 24.04
Proposed Changes
1. Fix 1Password CLI Installation (publish-tauri.yml)
File: .github/workflows/publish-tauri.yml
# Line 30-31: Fix the 1Password CLI action version
- name: Install 1Password CLI
uses: 1password/[email protected] # Use specific version2. Fix Svelte Build Errors
File: desktop/package.json
- Update or patch the
svelmadependency causing CSS parsing errors - Consider using a fork or different UI library if the issue persists
- Add build error handling to continue despite warnings
3. Fix Docker Build (Dockerfile.multiarch)
File: docker/Dockerfile.multiarch
# Line 14: Fix yarn.lock copy path
COPY desktop/package.json desktop/yarn.lock* ./
# Use optional copy or create empty file if missing4. Add Cross-Compilation Configuration
File: Create Cross.toml in project root
[build]
default-target = "x86_64-unknown-linux-gnu"
[target.x86_64-unknown-linux-musl]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-musl:latest"
[target.aarch64-unknown-linux-musl]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-musl:latest"
[target.armv7-unknown-linux-musleabihf]
image = "ghcr.io/cross-rs/armv7-unknown-linux-musleabihf:latest"5. Fix Windows Build Issues (release-comprehensive.yml)
File: .github/workflows/release-comprehensive.yml
# Lines 83-88: Fix Windows artifact preparation
- name: Prepare artifacts (Windows)
if: matrix.os == 'windows-latest'
shell: bash # Use bash instead of default PowerShell
run: |
mkdir -p artifacts
cp target/${{ matrix.target }}/release/terraphim_server.exe artifacts/terraphim_server-${{ matrix.target }}.exe
cp target/${{ matrix.target }}/release/terraphim-agent.exe artifacts/terraphim-agent-${{ matrix.target }}.exe6. Update GitHub Actions Dependencies
File: All workflow files
- Update
actions/checkout@v5βactions/checkout@v4(stable) - Update
actions/upload-artifact@v5βactions/upload-artifact@v4(stable) - Update
actions/download-artifact@v4(already correct) - Replace deprecated
actions-rs/toolchain@v1withdtolnay/rust-toolchain@stable
7. Fix Tauri Build Configuration (tauri-build.yml)
File: .github/workflows/tauri-build.yml
# Line 63: Fix Ubuntu 20.04 webkit package
- platform: ubuntu-20.04
webkit-package: "libwebkit2gtk-4.0-dev" # Ensure correct package for Ubuntu 20.048. Add Workflow Testing Script
File: Create scripts/test-workflows.sh
#!/bin/bash
# Test workflows locally using act
Implementation Steps
- Create a feature branch
-
Apply all fixes listed above
- Update workflow files with correct action versions
- Fix Docker build configuration
- Add Cross.toml for cross-compilation
- Fix Windows-specific issues
-
Test workflows locally
# Install act if not present
# Run test script
- Create pull request and test
- Monitor workflow runs on PR
Success Criteria
- β All platforms (Linux, macOS, Windows) build successfully
- β Docker multi-arch images build for all Ubuntu versions
- β Debian packages are created correctly
- β Tauri desktop app builds and packages for all platforms
- β Release artifacts are uploaded to GitHub Releases
- β No workflow failures in the release pipeline
Monitoring Commands
# Check workflow status
GH_PAGER=cat
# View specific workflow logs
GH_PAGER=cat
# Watch ongoing runs
Risk Mitigation
- Keep the existing workflows as backups (rename with .bak extension)
- Test changes incrementally on feature branch
- Use workflow dispatch for manual testing before merging
- Ensure all secrets are properly configured in repository settings