Skip to content

Add release command for automated database publishing #66

@mihaelamj

Description

@mihaelamj

Summary

Add cupertino release command that packages databases and uploads them to GitHub Releases automatically.

Implementation

  • ReleaseCommand.swift - Creates zip and uploads to GitHub
  • Version-matched releases (CLI 0.3.0 → tag v0.3.0)
  • SHA256 checksum in release notes
  • --dry-run flag for testing
  • --repo option for custom repository
  • --base-dir option for database location
  • Handles existing releases (deletes and recreates)
  • Uses GitHub API for release creation and asset upload

Usage

# Dry run (creates zip locally, no upload)
cupertino release --dry-run

# Publish to GitHub (requires GITHUB_TOKEN)
export GITHUB_TOKEN=your_token
cupertino release

# Custom repository
cupertino release --repo owner/repo

Workflow

  1. Refresh databases locally (cupertino fetch && cupertino save)
  2. Bump version in Constants.swift
  3. Run cupertino release

Output

📦 Cupertino Release v0.3.0

📊 Database sizes:
   search.db:  1.2 GB
   samples.db: 192.2 MB

📁 Creating cupertino-databases-v0.3.0.zip...
   ✓ Created (228.3 MB)

🔐 Calculating SHA256...
   17dac4b84adaa04b5f976a7d1b9126630545f0101fe84ca5423163da886386a6

🚀 Creating release v0.3.0...
   ✓ Release created

⬆️  Uploading cupertino-databases-v0.3.0.zip...
   ✓ Upload complete

✅ Release v0.3.0 published!
   https://github.com/mihaelamj/cupertino-docs/releases/tag/v0.3.0

Documentation

  • docs/commands/release/README.md - Main command documentation
  • docs/commands/release/option (--)/base-dir.md - Database directory option
  • docs/commands/release/option (--)/repo.md - GitHub repository option
  • docs/commands/release/option (--)/dry-run.md - Local testing flag
  • Updated docs/commands/README.md - Added release to commands table
  • Updated CHANGELOG.md - Version 0.3.0 entry
  • Updated AGENTS.md - Added release to CLI commands table

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions