Nyron

nyron release

Create GitHub releases with auto-generated changelogs

nyron release

Generate release notes and optionally publish a GitHub release.

Usage

npx @nyron/cli release

Preview changelog without creating release

npx @nyron/cli release --dry-run

Publish using the tag you already pushed

npx @nyron/cli release --use-existing-tag

Options

-d, --dry-run

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

npx @nyron/cli release --dry-run

-n, --use-existing-tag

Optional. Use the latest existing Nyron release tag as the release boundary.

Use this when:

  • You already created a tag with nyron push-tag
  • You are running in CI/CD after pushing the tag locally
  • You want local control over when the release boundary is created

When using --use-existing-tag, Nyron fetches commits between the previous boundary tag and the latest one. Without it, Nyron fetches commits since the latest boundary tag and then creates the next boundary tag after publishing.

npx @nyron/cli release --use-existing-tag

Local Preview vs GitHub Publishing

  • --dry-run works from local git history and does not require GITHUB_TOKEN
  • Publishing a GitHub release does require GITHUB_TOKEN

Example: Using with push-tag

# Create or push a release boundary tag locally
npx @nyron/cli push-tag

# Publish the GitHub release for that boundary
npx @nyron/cli release --use-existing-tag

How It Works

The release command works by:

  1. Determining which tags to use - Finds the latest Nyron release boundary tag
  2. Fetching commits - Gets commits between tags (with --use-existing-tag) or from the latest tag to HEAD
  3. Parsing conventional commits - Extracts features, fixes, and other changes
  4. Reading version information - Loads version data from the .nyron/ directory
  5. Generating a changelog - Creates markdown changelog from parsed commits
  6. Creating a GitHub release - Only when not using --dry-run
  7. Creating the next boundary tag - Only when publishing without --use-existing-tag

Prerequisites

  • Required for publishing: A GITHUB_TOKEN environment variable must be set
  • Required: At least one nyron-release@* tag must exist
  • 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
  • Groups commits by type (Features, Bug Fixes, Chores, etc.)
  • Includes author information and commit links
  • Creates a new nyron-release tag (only without --use-existing-tag) - This tag is created after publishing and marks the boundary for the next release

Tag Creation Behavior

  • Without --use-existing-tag: Creates a new Nyron release tag after publishing. This marks where the next release will start from.
  • With --use-existing-tag: Does not create a new tag. Uses the tag you already pushed.
  • Dry-run mode: Does NOT create a tag (or release), only previews what would be created.

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
npx @nyron/cli bump --type minor

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

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

# 4. Create GitHub release for that boundary
npx @nyron/cli release --use-existing-tag

Always use --use-existing-tag when you have already pushed a boundary tag with push-tag.

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
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 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:

Publishing a GitHub release requires GITHUB_TOKEN

Set your GitHub token in a .env file or environment variable, or run nyron release --dry-run to preview locally.

Next Steps