air-release

command module
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 9 Imported by: 0

README

air-release

A tiny local release helper: computes the next semantic version from conventional commits since the latest git tag, and generates a changelog section.

No configuration, no CI required, no dependencies beyond git.

Install

go install github.com/air-verse/air-release@latest

Usage

Run from the root of the repository you want to release:

air-release                # preview the next version and changelog
air-release -write         # also prepend the new section to CHANGELOG.md
air-release -tag           # also create the annotated git tag
air-release -tag -release  # also push the tag and create a GitHub release

Flags combine explicitly and nothing is implied — e.g. air-release -tag -write to both tag and update CHANGELOG.md, or air-release -write -tag -release for everything. Only -write touches CHANGELOG.md, and -release requires -tag.

With -tag, push the tag manually to trigger your release pipeline (e.g. goreleaser):

git push origin vX.Y.Z

With -release, the tag is pushed for you and a GitHub release is created via the gh CLI, using the generated changelog section as the release notes. Requires gh to be installed and authenticated (gh auth login).

How the version is decided

Commits since the latest vX.Y.Z tag are parsed as conventional commits:

Commit Bump
feat!: ... or BREAKING CHANGE in body major
feat: ... minor
anything else (fix:, docs:, non-conventional, ...) patch

While the major version is 0, bumps shift one level down (breaking changes bump minor, features bump patch); v1.0.0 must be tagged explicitly.

To override the inferred level, pass -bump major, -bump minor, or -bump patch. A forced bump is applied literally — the pre-1.0 downshift does not apply, so air-release -bump major -tag on v0.5.2 tags v1.0.0.

The changelog groups commits into Breaking Changes / Features / Bug Fixes / Performance / Others. Non-conventional commits are kept under Others rather than dropped, so review the output before tagging.

License

MIT

Documentation

Overview

Command air-release computes the next semantic version from conventional commits since the latest tag and generates a changelog section.

Run it from the root of the repository you want to release:

air-release                # preview next version and changelog
air-release -write         # also prepend the section to CHANGELOG.md
air-release -tag           # also create the git tag
air-release -tag -release  # also push the tag and create a GitHub release via gh

Flags combine explicitly and nothing is implied: CHANGELOG.md is only written with -write, and -release requires -tag.

While the major version is 0, bumps shift one level down (breaking changes bump minor, features bump patch); v1.0.0 must be tagged manually.

The bump level is inferred from the commits, but -bump major|minor|patch forces a specific level, bypassing inference and the pre-1.0 downshift.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL