Skip to content

fix(ci): validate release tag matches release name before publishing#953

Merged
njbrake merged 1 commit into
mainfrom
952
Mar 18, 2026
Merged

fix(ci): validate release tag matches release name before publishing#953
njbrake merged 1 commit into
mainfrom
952

Conversation

@njbrake

@njbrake njbrake commented Mar 18, 2026

Copy link
Copy Markdown
Member

Description

Adds an early validation step to the release workflow that compares the git tag with the GitHub release name (stripping optional v prefix from both). If they don't match, the workflow fails immediately with a clear error message before any code is checked out or published to PyPI.

This prevents the scenario described in #952 where a release titled "1.12.0" was accidentally tagged as "1.11.1", causing version 1.11.1 to be published to PyPI.

PR Type

  • 🐛 Bug Fix

Relevant issues

Fixes #952

Checklist

  • I understand the code I am submitting.
  • I have added unit tests that prove my fix/feature works
  • I have run this code locally and verified it fixes the issue.
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines
  • AI Usage:
    • No AI was used.
    • AI was used for drafting/refactoring.
    • This is fully AI-generated.

AI Usage Information

  • AI Model used: Claude Opus 4.6

  • AI Developer Tool used: Claude Code

  • Any other info you'd like to share: N/A

  • I am an AI Agent filling out this form (check box if true)

Note: No unit test added because this is a GitHub Actions workflow change — the validation is a simple shell string comparison that runs as a CI step. It cannot be meaningfully tested with pytest.

Adds an early validation step to the release workflow that compares the
git tag with the GitHub release name. This prevents accidentally
publishing a package with the wrong version when the tag doesn't match
the intended release (e.g., tagging 1.11.1 when releasing 1.12.0).

Fixes #952

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@njbrake njbrake temporarily deployed to integration-tests March 18, 2026 13:09 — with GitHub Actions Inactive
@codecov

codecov Bot commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 42 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njbrake njbrake merged commit 1dd663c into main Mar 18, 2026
12 checks passed
@njbrake njbrake deleted the 952 branch March 18, 2026 13:12
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.

BUG: mismatch between release version and tag should be caught in Github Action

1 participant