Skip to content

feat: implement industry-standard tag-based release workflow#24

Merged
doughayden merged 1 commit intomainfrom
feat/tag-based-release-workflow
Jun 28, 2025
Merged

feat: implement industry-standard tag-based release workflow#24
doughayden merged 1 commit intomainfrom
feat/tag-based-release-workflow

Conversation

@doughayden
Copy link
Copy Markdown
Owner

Summary

Implements tag-based release workflow (industry standard) to resolve branch protection conflicts with semantic-release.

Key Changes

  • Tag-only releases: Creates semantic version tags without modifying repository files
  • No version file tracking: Removes version_toml and version_variables from config
  • Protected branch compatible: No commits pushed back to main branch
  • Simplified permissions: Only requires contents: write for tag/release creation
  • Industry standard: Follows patterns used by React, Vue, Angular, and other major projects

Configuration Changes

semantic-release config:

[tool.semantic_release]
commit = false    # No version bump commits
push = false      # No pushes to main branch  
tag = true        # Create semantic version tags
vcs_release = true # Create GitHub releases

Workflow permissions:

permissions:
  contents: write  # For creating tags and releases
  id-token: write  # For OIDC token access

How It Works

  1. Push to main triggers workflow
  2. Semantic-release analyzes conventional commits
  3. Creates version tag (e.g., v0.3.0)
  4. Generates GitHub release with auto-generated notes
  5. No repository modifications - main branch stays clean

Benefits

Compatible with protected branches - no bypass needed
Industry standard pattern - used by major open source projects
Clean repository history - no automated version bump commits
Full automation - tags and releases created automatically
Conventional commits - semantic versioning based on commit messages

Testing Plan

  • Merge this PR to main
  • Verify workflow creates tag and release automatically
  • Confirm no commits pushed back to main
  • Validate GitHub release contains proper assets and notes

Resolves

🤖 Generated with Claude Code

- Remove version file tracking from semantic-release config
- Configure tag-only workflow (commit=false, push=false, tag=true)
- Simplify workflow permissions (remove unnecessary ones)
- Add workflow comments explaining tag-based approach
- Compatible with protected main branch

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@doughayden doughayden merged commit 82cd022 into main Jun 28, 2025
2 checks passed
@doughayden doughayden deleted the feat/tag-based-release-workflow branch June 28, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: semantic-release Git push fails with branch protection

1 participant