nyron push-tag
Create and push nyron-release tags for automated workflow triggers
nyron push-tag
Create and push nyron-release tags that trigger the automated release workflow.
Usage
npx @nyron/cli push-tag
What It Does
The push-tag
command:
- Generates a unique nyron-release tag with current timestamp
- Creates the git tag locally (with GPG signing if available)
- Pushes the tag to the remote repository
- Updates meta.json with the latest release tag
- Triggers automated workflows that process the .nyron/ directory
GPG Signing
Nyron automatically signs tags with GPG if you have it configured, providing enhanced security and verification for your releases.
Automatic Detection
The push-tag
command automatically detects if GPG signing is available:
- ✅ GPG configured: Creates a signed annotated tag
- ✅ No GPG: Falls back to a regular lightweight tag (no errors)
Enabling GPG Signing
To enable GPG signing for your tags, configure Git with your GPG key:
# Set your GPG signing key
git config --global user.signingkey YOUR_GPG_KEY_ID
# Optional: Enable automatic signing for all tags
git config --global tag.gpgSign true
Verifying GPG-Signed Tags
After pushing a signed tag, you can verify it:
# List all tags with verification status
git tag -v nyron-release@2024-01-15@14-30-25.123
Benefits of Signed Tags
- Authenticity: Proves the tag was created by you
- Integrity: Ensures the tag hasn't been tampered with
- Trust: Provides cryptographic verification for your releases
- GitHub verified badge: Signed tags show a "Verified" badge on GitHub
Tag Format
Nyron-release tags follow this format:
nyron-release@YYYY-MM-DD@HH-MM-SS.mmm
Example:
nyron-release@2024-01-15@14-30-25.123
This format ensures:
- Chronological ordering of releases
- Unique timestamps to avoid conflicts
- Machine-readable format for automated processing
Prerequisites
- Required: Changes must be committed to git
- Required:
.nyron/
directory must contain version metadata (created bybump
command) - Recommended: Push permissions to the repository
When to Use push-tag
The push-tag
command is optional. Use it when you want to:
- GPG-sign your release tags locally before pushing
- Trigger automated CI/CD workflows that create releases
- Manually control when tags are created (instead of letting
release
create them)
Option 1: Use push-tag with automated workflow
# 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 GPG-signed tag (triggers CI/CD)
npx @nyron/cli push-tag
# 4. Push commits
git push
# Your CI/CD workflow will run: nyron release -n
Option 2: Skip push-tag (simpler)
# 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 release (this also creates the tag)
npx @nyron/cli release
# 4. Push commits
git push
What Happens Next
After pushing a nyron-release tag:
- Automated workflows can detect the new tag
- Version information is extracted from .nyron/ directory
- Changelog generation becomes possible via
release
command - Release automation can process the accumulated changes
Examples
Basic usage
npx @nyron/cli push-tag
Sample output:
🏷️ Creating nyron-release tag...
✓ Generated tag: nyron-release@2024-01-15@14-30-25.123
✓ Tag created and pushed successfully
✅ Updated meta.json with latest tag: nyron-release@2024-01-15@14-30-25.123
After version bump
# Bump first
npx @nyron/cli bump --type minor --prefix v
# Commit the changes
git add .
git commit -m "chore: bump version to 1.2.0"
# Push the nyron-release tag
npx @nyron/cli push-tag
Understanding Nyron Tags
Nyron uses a dual-tag system:
Project Tags (from bump command)
- Format:
v1.2.0
,@pkg/name@1.2.0
- Purpose: Mark specific package versions
- Created by:
bump
command - Used for: Version tracking, changelog boundaries
Nyron-Release Tags (from push-tag command)
- Format:
nyron-release@2024-01-15@14-30-25.123
- Purpose: Trigger release automation
- Created by:
push-tag
command - Used for: Workflow triggers, release boundaries
Error Handling
Git not clean:
Error: Working directory not clean
Commit your changes first before running push-tag
.
No .nyron/ directory:
Error: No version metadata found
Run nyron bump
first to generate version information.
Push permission denied:
Error: Permission denied (publickey)
Ensure you have push access to the repository.
Integration with CI/CD
Nyron-release tags can trigger automated workflows. When you push a nyron-release tag locally, GitHub Actions can automatically create the release for you.
Quick Setup
Create .github/workflows/release.yml
:
name: Publish Github Release Using Nyron
on:
push:
tags:
- 'nyron-release@*'
permissions:
contents: write
jobs:
publish-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- run: bun x @nyron/cli release -n
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Important: Use the -n
flag in the workflow to prevent creating a duplicate tag, since you already created it locally with push-tag
.
How It Works
When you run npx @nyron/cli push-tag
locally:
- ✅ Tag is created locally (with GPG signing if configured)
- ✅ Tag is pushed to GitHub
- ✅ GitHub Actions workflow is triggered automatically
- ✅ Workflow runs
nyron release -n
(skips tag creation) - ✅ GitHub release is created with auto-generated changelog
This means you only need to run push-tag
locally, and the CI/CD workflow handles creating the actual GitHub release!
See the complete automated workflow guide for more details and customization options.
Next Steps
- Use
nyron release
to create GitHub releases - Learn about the complete workflow
- Understand how Nyron works