Nyron

nyron release

Create GitHub releases with auto-generated changelogs

nyron release

Create GitHub releases with auto-generated changelogs based on commits between nyron-release tags.

Usage

npx @nyron/cli release

Preview changelog without creating release

npx @nyron/cli release --dry-run

Skip tag creation (use existing tag)

npx @nyron/cli release -n

Options

-d, --dry-run

Optional. Preview the changelog without creating an actual GitHub release.

npx @nyron/cli release --dry-run

-n, --no-tag

Optional. Skip creating a new nyron-release tag. Use this when:

  • You already created a tag with push-tag command
  • Running in CI/CD after tag was pushed locally
  • You want to use a GPG-signed tag created manually
npx @nyron/cli release -n

Example: Using with push-tag

# Create GPG-signed tag locally
npx @nyron/cli push-tag

# Create release without creating another tag
npx @nyron/cli release -n

How It Works

The release command works by:

  1. Finding the latest nyron-release tag - Looks for tags like nyron-release@2024-01-15@14-30-25.123
  2. Fetching commits since that tag to HEAD
  3. Parsing conventional commits to extract features, fixes, and other changes
  4. Reading version information from the .nyron/ directory
  5. Generating a changelog in markdown format
  6. Creating a GitHub release with the changelog as the description

Prerequisites

  • Required: A GITHUB_TOKEN environment variable must be set
  • Required: At least one nyron-release tag must exist (created by push-tag)
  • Required: Commits must follow conventional commit format

What It Does

The release command:

  • Creates a GitHub release on your repository
  • Uses an auto-generated changelog as the release description
  • Tags the release with a new nyron-release tag
  • Groups commits by type (Features, Bug Fixes, Chores, etc.)
  • Includes author information and commit links

Examples

Create a release

npx @nyron/cli release

Preview what will be released

npx @nyron/cli release --dry-run

Sample output:

📍 Step 1: Finding latest release tag...
✓ Found tag: nyron-release@2024-01-15@14-30-25.123

📍 Step 2: Fetching commits since last release...
✓ Found 5 commit(s)

📍 Step 3: Parsing commits...
✓ Parsed commits into groups (features, fixes, etc.)

📍 Step 4: Reading version information...
✓ Loaded version data for 2 package(s)

📍 Step 5: Generating changelog...
✓ Changelog generated (1,234 characters)

📍 Step 6: Preview (DRY RUN - no release created)
================================================================================
## Features
- **api**: add OAuth2 login ([@username](https://github.com/username)) [[a1b2c3d](https://github.com/owner/repo/commit/a1b2c3d)]

## Bug Fixes  
- **auth**: resolve token refresh issue ([@username](https://github.com/username)) [[e4f5g6h](https://github.com/owner/repo/commit/e4f5g6h)]
================================================================================

✅ Dry run completed - no release was created

Typical Workflow

Manual Workflow

The release command is typically used as the final step:

# 1. Bump version and generate changelog
npx @nyron/cli bump --type minor --prefix v

# 2. Commit changes
git add .
git commit -m "chore: bump version to 1.2.0"

# 3. Create and push nyron-release tag
npx @nyron/cli push-tag

# 4. Create GitHub release
npx @nyron/cli release

Alternatively, set up a GitHub Actions workflow to automatically run the release command when you push a nyron-release tag:

# 1. Bump and commit
npx @nyron/cli bump --type minor --prefix v
git add . && git commit -m "chore: bump version to 1.2.0"

# 2. Push tag (triggers automated release)
npx @nyron/cli push-tag

# ✨ The GitHub release is created automatically by CI/CD!

This workflow requires a .github/workflows/release.yml file in your repository. See the automated workflow guide for setup instructions.

Error Handling

No nyron-release tag found:

Error: No nyron release tag found
   → Make sure to push the tag with nyron tool

Run npx @nyron/cli push-tag first.

No commits found:

⚠️  No commits found between tags - skipping release

This means there are no new commits since the last release.

Missing GitHub token:

Error: GITHUB_TOKEN environment variable is required

Set your GitHub token in a .env file or environment variable.

Next Steps