Automated versioning, Docker builds, and GitHub/Forgejo releases.
- TypeScript 100%
| .gitignore | ||
| bun.lock | ||
| package.json | ||
| publish.ts | ||
| README.md | ||
Release CLI
Universal release automation for Docker projects with Git.
Installation
Option 1: Global npm package (recommended)
# 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.jsonin project rootDockerfilein project root (optional - for version label updates)- Docker with buildx configured (for container builds)
- GitHub CLI (
gh) installed (for GitHub releases)
What it does
- Version bump - Updates
package.jsonandDockerfileversion - Git commit - Conventional commit wizard
- Channel selection -
latest,beta,canary - Tagging - Creates/moves Git tags
- Docker build & push - Multi-arch builds to Forgejo + GHCR
- Git push - Syncs commits and tags to remote
- 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.