Automated release tooling for Deno projects. Handles version management, changelog generation, testing, and GitHub releases with optional binary compilation.
- Version Management: Automated version bumping (major/minor/patch) with validation
- Changelog Automation: Extracts and formats changelog entries for releases
- GitHub Integration: Creates releases with changelogs and optional binary artifacts
- Binary Compilation: Conditionally compiles and attaches platform-specific binaries
- Project Initialization: Adds release automation to existing projects
Initialize release automation in an existing Deno project:
deno run -Ar jsr:@fry69/release-initThis copies the necessary workflows and tools to your project.
Run tools directly without installation:
# Create a release
deno run -Ar jsr:@fry69/release-init/tools/release patch
# Extract metadata
deno run -Ar jsr:@fry69/release-init/tools/get-meta
# Get changelog for version
deno run -Ar jsr:@fry69/release-init/tools/get-changelog 1.0.0Installs release automation to existing Deno projects.
deno run -Ar jsr:@fry69/release-init [options] [target-directory]
Options:
--force Overwrite existing files
--yes Skip confirmation prompts
--quiet Suppress non-essential output
--help Show help message
--version Show versionCopies these files to target project:
.github/workflows/release.yml- GitHub Actions workflowtools/release.ts- Release scripttools/get-meta.ts- Metadata extractiontools/get-changelog.ts- Changelog parsingtools/update-changelog.ts- Changelog updatingCHANGELOG.md- Changelog template (if missing)LICENSE- MIT License (if missing)
Automates version bumps, testing, and git tagging.
deno task release [options] <version|major|minor|patch>
Options:
-d, --dry-run Stop before pushing to GitHub
-y, --yes Skip confirmation prompt
-q, --quiet Suppress non-essential output
-h, --help Show help message
-v, --version Show script version
Examples:
deno task release 1.0.0 # Set specific version
deno task release patch # Bump patch (0.2.4 -> 0.2.5)
deno task release minor # Bump minor (0.2.4 -> 0.3.0)
deno task release major # Bump major (0.2.4 -> 1.0.0)Workflow:
- Validates version bump
- Updates
deno.jsonand entry point file - Updates
CHANGELOG.mdwith release date - Runs test suite
- Creates git commit with changelog
- Creates annotated git tag with changelog
- Pushes commit and tag to remote
Automated workflow triggered on version tags. Handles:
- Changelog Extraction: Parses
CHANGELOG.mdfor release notes - Binary Compilation (optional): Compiles platform-specific binaries if
compile:citask exists - Release Creation: Creates GitHub release with changelog and artifacts
Supported platforms for binary compilation:
- Linux x86_64
- macOS x86_64
- macOS ARM64
- Windows x86_64
Extracts project metadata from deno.json:
deno task get-meta
Output format (GITHUB_OUTPUT compatible):
tool_name=release-init
tool_version=0.0.1
entry=./src/main.ts
has_compile_task=trueget-changelog.ts: Extracts changelog entry for specific version
deno task get-changelog 1.0.0update-changelog.ts: Updates CHANGELOG.md with release date
deno task update-changelog 1.0.0The workflow conditionally compiles binaries based on project configuration.
Add a compile:ci task to deno.json:
{
"tasks": {
"compile:ci": "deno compile -A --include templates"
}
}The workflow will:
- Detect the
compile:citask - Run compilation for all supported platforms
- Package binaries as zip files
- Attach them to the GitHub release
Omit the compile:ci task. The workflow will skip compilation and create a
release with only the changelog.
- Deno 2.1+ (for compilation with
--includeflag) deno.jsonwithnameandversionfieldsCHANGELOG.mdfollowing Keep a Changelog format- Entry point file (default:
./src/main.ts) withVERSIONconstant - Git repository with GitHub remote
{
"name": "@scope/package",
"version": "0.1.0",
"exports": {
".": "./src/main.ts"
},
"tasks": {
"check": "deno fmt --check && deno lint && deno test",
"compile:ci": "deno compile -A --include resources"
}
}export const VERSION = "0.1.0";
// ... rest of codeThe release workflow supports manual triggers with parameters:
- Tag Name: Override automatic tag (e.g.,
v1.0.0-beta.1) - Release Name: Custom release title
- Draft Mode: Create as draft instead of publishing
Trigger via GitHub Actions UI or:
gh workflow run release.yml -f tag_name=v1.0.0 -f draft=trueMIT License - see LICENSE for details.
# Run tests
deno task test
# Check code quality
deno task check
# Compile local binary
deno task compile:local
# Install locally
deno task install:local