Skip to content

fix: pull tags - #17

Merged
aspectrr merged 1 commit into
mainfrom
aspectrr/release-tags
Jan 17, 2026
Merged

fix: pull tags#17
aspectrr merged 1 commit into
mainfrom
aspectrr/release-tags

Conversation

@aspectrr

Copy link
Copy Markdown
Owner

Description

  • add pull tags for release workflow

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code style update (formatting, renaming)
  • Code refactor (no functional changes)
  • Configuration change
  • Test update

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Release Notes

Labels

@claude

claude Bot commented Jan 17, 2026

Copy link
Copy Markdown

Pull Request Review

Summary

This PR adds the fetch-tags: true parameter to the actions/checkout@v4 step in the release workflow. This is a valid and necessary fix for GoReleaser to work correctly.


✅ Positive Aspects

  1. Correct Fix: The fetch-tags: true parameter is necessary for GoReleaser to access git tags for versioning
  2. Minimal Change: Single-line addition with no side effects
  3. Follows Pattern: The fetch-depth: 0 already present indicates shallow clone awareness
  4. Context Aware: This complements the existing GPG signing setup from PR fix: goreleaser fix #16

📋 Code Quality Assessment

Rating: Good

  • Best Practices: Using fetch-tags: true is the recommended approach for tag-dependent workflows
  • Clarity: The change is self-documenting and obvious in purpose
  • Consistency: Aligns with GoReleaser requirements documented in their official docs

🔍 Technical Analysis

Why This Fix Is Needed

GoReleaser relies on git tags for:

  • Version detection ({{ .Version }} in .goreleaser.yaml:27)
  • Changelog generation (.goreleaser.yaml:82-87)
  • Release artifact naming

With actions/checkout@v4, tags are not fetched by default even with fetch-depth: 0. This means:

  • Without fetch-tags: true: GoReleaser can't find the tag that triggered the workflow
  • With fetch-tags: true: Tags are explicitly fetched, enabling proper version detection

Verification

The .goreleaser.yaml file confirms tag dependency:

ldflags:
  - -X main.version={{ .Version }}  # Requires tag access
  - -X main.commit={{ .Commit }}
  - -X main.date={{ .Date }}

🐛 Potential Issues

None identified. The change is safe and necessary.


🔒 Security Considerations

No security concerns. This change:

  • Only affects git metadata fetching (read-only operation)
  • Doesn't expose secrets or sensitive data
  • Doesn't modify permission scopes

⚡ Performance Considerations

Minimal impact:

  • Fetching tags adds negligible overhead (<1 second typically)
  • Trade-off is necessary for workflow functionality
  • One-time cost during checkout phase

🧪 Test Coverage

N/A - This is a GitHub Actions workflow configuration change. Testing would require:

  • Creating a test tag
  • Triggering the release workflow
  • Verifying GoReleaser can access version information

Recommendation: After merge, verify by pushing a test tag and confirming the release workflow completes successfully.


📝 Suggestions

1. Add a Comment (Optional)

Consider adding a brief comment explaining why this is needed:

- name: Checkout
  uses: actions/checkout@v4
  with:
    fetch-depth: 0
    # Required for GoReleaser to access git tags for versioning
    fetch-tags: true

2. Update Documentation

The docs/tagging.md file could mention that tags must be pushed for releases to work, referencing this workflow requirement.


✅ Recommendation

APPROVE and MERGE

This is a necessary bug fix that should be merged. The change is:

  • Technically correct
  • Well-scoped
  • Low risk
  • Addressing a real issue with the release workflow

📚 References


Overall Assessment: ✅ Ready to merge

Great work identifying and fixing this issue! This completes the release workflow fixes started in PR #16.

@aspectrr
aspectrr merged commit 5aacf03 into main Jan 17, 2026
4 of 5 checks passed
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.

1 participant