Skip to content

fix(ci): support retrying an existing release tag - #9

Merged
alexrett merged 1 commit into
mainfrom
agent/release-retry
Aug 5, 2026
Merged

fix(ci): support retrying an existing release tag#9
alexrett merged 1 commit into
mainfrom
agent/release-retry

Conversation

@alexrett

@alexrett alexrett commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Use the explicit GitHub repository when creating a release, and add a required tag input for safely retrying an existing release from Actions. The version gate now applies to both tag pushes and manual retries.

Verified the YAML parser and the v0.3.1 version gate locally.

Copilot AI lite review requested due to automatic review settings August 5, 2026 19:28
@alexrett
alexrett merged commit b083674 into main Aug 5, 2026
4 checks passed
@alexrett
alexrett deleted the agent/release-retry branch August 5, 2026 19:28

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the release GitHub Actions workflow to support safely retrying a release for an already-existing tag via workflow_dispatch, while ensuring the package version gate applies consistently.

Changes:

  • Adds a required workflow_dispatch input (tag) and a derived RELEASE_TAG env var.
  • Applies the package.json version-to-tag check to both tag-push releases and manual retries.
  • Makes gh release create target an explicit repository via --repo "$GITHUB_REPOSITORY".
Suppressed comments (3)

.github/workflows/release.yml:15

  • RELEASE_TAG is derived from inputs.tag, but for non-workflow_dispatch events the inputs context may be empty/undefined, and for manual runs users sometimes paste refs/tags/<tag>. Consider basing this on github.event.inputs.tag and stripping an optional refs/tags/ prefix so downstream comparisons and gh release create always get the plain tag name.
  RELEASE_TAG: ${{ inputs.tag || github.ref_name }}

.github/workflows/release.yml:15

  • For a manual retry, this workflow can be dispatched on the default branch while RELEASE_TAG points at an older tag. That can rebuild artifacts from a different commit (package.json version could still match), which undermines the goal of safely retrying an existing tag. To make retries deterministic, the checkout steps in all jobs should checkout ref: ${{ env.RELEASE_TAG }} when inputs.tag is provided (or always, since it matches github.ref_name on tag pushes).
  RELEASE_TAG: ${{ inputs.tag || github.ref_name }}

.github/workflows/release.yml:93

  • The github-release job condition uses inputs.tag != '', but tag is required for workflow_dispatch and inputs may be unset on push events. Using the event name makes the intent explicit and avoids edge cases around null/empty comparisons.
    if: startsWith(github.ref, 'refs/tags/v') || inputs.tag != ''

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +9 to +12
tag:
description: Existing release tag to retry
required: true
type: string
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