GITFLOW_AUTOMATION_ISSUE.md•2.04 kB
# GitFlow Automation Issue - Missing Automatic Tagging
## Issue Found
When PR #401 (release/v1.3.2) was merged to main, the tag was NOT automatically created. This required manual intervention to:
1. `git tag v1.3.2`
2. `git push origin v1.3.2`
## Expected Behavior
According to GitFlow best practices, when a release branch is merged to main:
1. The merge should be detected
2. The version should be extracted from package.json
3. A tag should be automatically created
4. The tag should be pushed to trigger the NPM release workflow
## Current State
- ✅ PR merge protection works
- ✅ NPM release workflow exists (triggers on tags)
- ❌ No automatic tag creation
- ❌ Manual step required between merge and release
## Impact
This breaks the automated release flow and requires manual intervention, which:
- Increases chance of human error
- Delays releases
- Breaks the "merge and forget" workflow
- Could lead to version mismatches
## Solution Needed
Create a GitHub Action workflow that:
1. Triggers on PR merge to main
2. Checks if the PR was from a release/* branch
3. Extracts version from package.json
4. Creates and pushes the appropriate tag
Example workflow needed:
```yaml
name: GitFlow Auto Tag
on:
pull_request:
types: [closed]
branches: [main]
jobs:
auto-tag:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract version and create tag
run: |
VERSION=$(node -p "require('./package.json').version")
git tag "v$VERSION"
git push origin "v$VERSION"
```
## Workaround
For now, after merging a release PR, manually run:
```bash
git checkout main
git pull origin main
VERSION=$(node -p "require('./package.json').version")
git tag "v$VERSION"
git push origin "v$VERSION"
```
## Priority
High - This is a critical part of the GitFlow automation that's missing.
---
*Discovered: July 29, 2025 during v1.3.2 release*