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
106 changes: 106 additions & 0 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build and Release Desktop Apps

on:
push:
tags:
- 'v*.*.*' # Trigger on version tags like v2.1.0
workflow_dispatch: # Allow manual triggering

permissions:
contents: write # Required to create GitHub Releases

jobs:
build-desktop:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
platform: linux
artifact: ODIA-*.AppImage
- os: windows-latest
platform: windows
artifact: ODIA-Setup-*.exe
- os: macos-latest
platform: mac
artifact: ODIA-*.dmg
Comment on lines +21 to +27
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Windows artifact glob ODIA-Setup-*.exe is more specific than the existing CI workflow (which uploads desktop/dist/*.exe) and may not match electron-builder’s default NSIS naming (often includes spaces). Consider using desktop/dist/*.exe (and similar broad globs) or explicitly setting artifactName in the electron-builder config to guarantee these names.

Suggested change
artifact: ODIA-*.AppImage
- os: windows-latest
platform: windows
artifact: ODIA-Setup-*.exe
- os: macos-latest
platform: mac
artifact: ODIA-*.dmg
artifact: '*.AppImage'
- os: windows-latest
platform: windows
artifact: '*.exe'
- os: macos-latest
platform: mac
artifact: '*.dmg'

Copilot uses AI. Check for mistakes.

runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: desktop/package-lock.json

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'

- name: Install system dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential fakeroot rpm libfuse2

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install pyinstaller

- name: Build Python backend
working-directory: desktop
run: |
npm ci
npm run build:backend

- name: Build frontend for Electron
working-directory: frontend
shell: bash
env:
ELECTRON_BUILD: '1'
run: |
npm ci
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow runs npm ci in frontend/, but the repo does not contain a frontend/package-lock.json (or other lockfile), so the step will fail. Either commit a lockfile and keep npm ci, or change this to npm install.

Suggested change
npm ci
npm install

Copilot uses AI. Check for mistakes.
npx next build

- name: Copy frontend to desktop build
shell: bash
run: |
mkdir -p desktop/build/frontend
if [ -d "frontend/out" ]; then
cp -r frontend/out/. desktop/build/frontend/
else
echo "Error: frontend/out not found. Ensure ELECTRON_BUILD=1 was set." >&2
exit 1
fi

- name: Build Electron installer
working-directory: desktop
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: odia-desktop-${{ matrix.platform }}
path: desktop/dist/${{ matrix.artifact }}
retention-days: 7

- name: Upload to Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: desktop/dist/*
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@ Legistar-based jurisdiction or custom legal corpus.

**Desktop App (no installation prerequisites):**

Download the standalone desktop application — no Python, Docker, or command line
required. All analysis runs locally on your machine.
Pre-built installers will be available in the [Releases](https://github.com/SynTechRev/ODIA/releases) section soon. For now, build the desktop application locally:

Comment on lines 18 to 21
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section still claims “no installation prerequisites”, but the only path offered now is building locally (which requires Node/Python and other tooling). Please reword this heading/intro so it doesn’t imply users can use the desktop app without prerequisites until pre-built installers actually exist.

Copilot uses AI. Check for mistakes.
| Platform | Download |
|----------|----------|
| Windows | [ODIA-Setup.exe](https://github.com/SynTechRev/ODIA/releases/latest/download/ODIA-Setup.exe) |
| macOS | [ODIA.dmg](https://github.com/SynTechRev/ODIA/releases/latest/download/ODIA.dmg) |
| Linux | [ODIA.AppImage](https://github.com/SynTechRev/ODIA/releases/latest/download/ODIA.AppImage) |
```bash
# Build desktop application
cd desktop
npm install
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These build-from-source steps omit installing the Python package deps (and PyInstaller) before running npm run build:backend. Without a prior pip install -e ... (and PyInstaller availability), build:backend is likely to fail; consider adding the same prerequisite step shown in desktop/README.md.

Suggested change
npm install
npm install
cd ..
pip install -e .[desktop] # Install Python package deps and PyInstaller
cd desktop

Copilot uses AI. Check for mistakes.
npm run build:backend # Build Python backend
cd ../frontend
npm ci
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm ci will fail in frontend/ because the repo doesn’t include a frontend/package-lock.json (or other lockfile). Either add a lockfile and keep npm ci, or switch these instructions to npm install to match the current repo state.

Suggested change
npm ci
npm install

Copilot uses AI. Check for mistakes.
ELECTRON_BUILD=1 npm run build # Build frontend for Electron
cd ../desktop
npm run build # Create installer for your platform
```

See [desktop/README.md](desktop/README.md) for usage instructions and troubleshooting.
Installers are output to `desktop/dist/`. See [desktop/README.md](desktop/README.md) for detailed build instructions and platform-specific requirements.

**With Docker (no Python/Node required):**
```bash
Expand Down
78 changes: 78 additions & 0 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Release Process

## Automated Desktop Releases

Desktop application releases are automated via GitHub Actions
(`.github/workflows/release-desktop.yml`).

### Creating a New Release

1. **Update version** in relevant package files:

```bash
# Update desktop/package.json version field to X.Y.Z
# Update pyproject.toml version field to X.Y.Z
```

2. **Commit version bump:**

```bash
git add desktop/package.json pyproject.toml
git commit -m "chore: bump version to X.Y.Z"
git push
```

3. **Create and push tag:**

```bash
git tag vX.Y.Z
git push origin vX.Y.Z
```

4. **GitHub Actions automatically:**
- Builds desktop installers for Windows, macOS, and Linux
- Creates a GitHub Release
- Uploads installers as release assets
- Generates release notes

5. **Verify release:**
- Check <https://github.com/SynTechRev/ODIA/releases>
- Test download links work
- Download and test installers on each platform

### Manual Release (Fallback)

If the automated release fails:

```bash
# Build locally for your platform
cd desktop
npm run build:win # Windows
npm run build:mac # macOS
npm run build:linux # Linux

# Manually create a release on GitHub and upload installers from desktop/dist/
```
Comment on lines +47 to +55
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manual fallback commands build installers directly, but electron-builder depends on build/backend and build/frontend being populated first. Please add the required steps (build backend, build/export frontend with ELECTRON_BUILD=1, copy frontend/out into desktop/build/frontend) before npm run build:win/mac/linux, consistent with desktop/README.md.

Copilot uses AI. Check for mistakes.

## Release Checklist

- [ ] Version bumped in `desktop/package.json`
- [ ] Version bumped in `pyproject.toml`
- [ ] CHANGELOG updated (if maintained)
- [ ] All tests passing (`pytest` and `cd desktop && npm test`)
- [ ] Desktop app builds successfully locally
- [ ] Tag created and pushed (`git tag vX.Y.Z && git push origin vX.Y.Z`)
- [ ] GitHub Actions workflow completes without errors
- [ ] Release appears on <https://github.com/SynTechRev/ODIA/releases>
- [ ] Download links tested
- [ ] Installers tested on target platforms (Windows, macOS, Linux)

## Workflow Overview

The release workflow (`.github/workflows/release-desktop.yml`) runs on:

- **Version tags** matching `v*.*.*` (e.g., `v2.1.0`) — full build + release
- **Manual dispatch** — full build + artifact upload (no release created unless on a tag)

The existing CI workflow (`.github/workflows/desktop-build.yml`) handles
continuous integration builds for pull requests and branch pushes.
Loading