Skip to content

Fix: Release artifact filtering for new naming convention#40

Merged
technicalpickles merged 2 commits intomainfrom
fix/release-artifact-filtering
Sep 4, 2025
Merged

Fix: Release artifact filtering for new naming convention#40
technicalpickles merged 2 commits intomainfrom
fix/release-artifact-filtering

Conversation

@technicalpickles
Copy link
Copy Markdown
Owner

@technicalpickles technicalpickles commented Sep 4, 2025

Problem

The v0.2.2 release at https://github.com/technicalpickles/envsense/releases/tag/v0.2.2 is missing the Linux binary, even though the GitHub Actions run shows both binaries were built successfully.

Root Cause

The release workflow's artifact filtering step was still using the old naming pattern:
```bash
find dist/ -name "envsense-v*" -not -name "-test" -exec cp {} release-files/ ;
```

But in v0.2.2 we updated the naming convention to remove the "v" prefix:

  • Old: `envsense-v0.2.2-universal-apple-darwin`
  • New: `envsense-0.2.2-universal-apple-darwin`

This caused the Linux binary (`envsense-0.2.2-x86_64-unknown-linux-gnu`) to be filtered out.

Solution

🔧 Fixed Release Workflow

Updated the pattern from `envsense-v*` to `envsense-*` to match the new naming convention.

🧪 Enhanced Testing to Prevent Future Issues

Added comprehensive testing improvements to catch this type of issue early:

  1. Release Artifact Filtering Simulation: `test-release.sh` now simulates the exact filtering logic from the release workflow and validates that all expected binaries would be included.

  2. Updated Test Targets: Simplified test script to match actual release targets (Linux x64 + macOS Universal only).

  3. Fixed Test Workflow: Updated `.github/workflows/test-release-scripts.yml` to use the new naming convention.

Testing

  • ✅ Verified the pattern in the workflow was incorrect
  • ✅ Updated to match new naming convention
  • ✅ Added filtering simulation that would have caught this issue
  • ✅ Test script now validates: `✓ All expected release files present!`
  • ✅ Next release will include both Linux and macOS binaries

Impact

  • Immediate: Fixes the missing Linux binary issue for future releases
  • Long-term: Prevents similar issues with comprehensive testing that simulates the release process
  • Developer Experience: Clear feedback when naming patterns don't match between build and release steps

This comprehensive fix ensures both the immediate issue is resolved and similar problems are caught during development.

The release workflow was still looking for 'envsense-v*' pattern but
we updated the naming convention to 'envsense-{version}' without the 'v' prefix
in v0.2.2. This caused the Linux binary to be filtered out of releases.

Issue: Only the macOS universal binary appeared in the v0.2.2 release,
even though both binaries were built successfully.

Fix: Update the pattern from 'envsense-v*' to 'envsense-*' to match
the new naming convention.
Copilot AI review requested due to automatic review settings September 4, 2025 19:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a critical issue where Linux binaries were being excluded from GitHub releases due to an outdated artifact filtering pattern in the release workflow. The fix updates the pattern to match the current naming convention that was changed in v0.2.2.

  • Updates artifact filtering pattern from envsense-v* to envsense-* to match new naming convention
  • Ensures both Linux and macOS binaries are included in future releases

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Enhanced test scripts to prevent issues like the v0.2.2 Linux binary missing:

1. **Updated test-release.sh**:
   - Match actual release targets (Linux x64 + macOS Universal only)
   - Added release artifact filtering simulation
   - Verify all expected binaries would be included in releases
   - Simplified cross-platform logic to match current workflow

2. **Fixed test-release-scripts.yml**:
   - Updated to use new naming convention (removed 'v' prefix)
   - Fixed hardcoded version reference

3. **New validation**:
   - Simulates exact filtering logic from release.yml
   - Catches mismatched naming patterns before they reach production
   - Validates that all built binaries would be released

This would have caught the v0.2.2 issue where the Linux binary was
built but filtered out due to the naming pattern mismatch.
@technicalpickles technicalpickles merged commit 161c264 into main Sep 4, 2025
10 checks passed
@technicalpickles technicalpickles deleted the fix/release-artifact-filtering branch September 4, 2025 19:51
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.

2 participants