Automated versioning, Docker builds, and GitHub/Forgejo releases.
  • TypeScript 100%
Find a file
2026-04-21 14:56:13 +00:00
.gitignore fix: improved remote detection and fj integration 2026-04-21 01:38:49 -04:00
bun.lock init 2026-04-21 00:57:10 -04:00
package.json fix: fixed release prompt and fj release api integration 2026-04-21 02:03:02 -04:00
publish.ts fix: fixed release prompt and fj release api integration 2026-04-21 02:03:02 -04:00
README.md Update README.md 2026-04-21 14:56:13 +00:00

Release CLI

Universal release automation for Docker projects with Git.

Installation

# In this directory, link it globally
bun link

# Now you can run 'release' from any project directory
cd ~/path/to/your/project
release

Option 2: Standalone script

# Put the script somewhere in your PATH
mkdir -p ~/bin
cp publish.ts ~/bin/release
chmod +x ~/bin/release

# Add to your PATH if not already there (add to ~/.zshrc or ~/.bashrc)
export PATH="$HOME/bin:$PATH"

Option 3: Remote execution (simplest)

# Store on GitHub/Forgejo, then:
curl -fsSL https://raw.githubusercontent.com/dawescc/release-cli/main/publish.ts | bun run -

Usage

Navigate to any project directory with a package.json and run:

release

Or dry-run mode:

release --dry-run

Requirements

  • Bun runtime installed
  • Git repository
  • package.json in project root
  • Dockerfile in project root (optional - for version label updates)
  • Docker with buildx configured (for container builds)
  • GitHub CLI (gh) installed (for GitHub releases)

What it does

  1. Version bump - Updates package.json and Dockerfile version
  2. Git commit - Conventional commit wizard
  3. Channel selection - latest, beta, canary
  4. Tagging - Creates/moves Git tags
  5. Docker build & push - Multi-arch builds to Forgejo + GHCR
  6. Git push - Syncs commits and tags to remote
  7. GitHub release - Creates release with editor for notes

Customization

The script currently hardcodes registry paths:

  • Forgejo: forgejo.dawes.cc/ryan/{repo}
  • GHCR: ghcr.io/dawescc/{repo}

To customize for your registries, edit the phaseBuildPush function.