Skip to content

fix(release): correct target_commitish and use v-prefixed tags - #37

Merged
Suneha Bose (bosesuneha) merged 1 commit into
Azure:mainfrom
bosesuneha:fix/release-target-commitish-and-v-prefix
Jul 31, 2026
Merged

fix(release): correct target_commitish and use v-prefixed tags#37
Suneha Bose (bosesuneha) merged 1 commit into
Azure:mainfrom
bosesuneha:fix/release-target-commitish-and-v-prefix

Conversation

@bosesuneha

@bosesuneha Suneha Bose (bosesuneha) commented Jul 31, 2026

Copy link
Copy Markdown
Member

Problem

release.yaml fails end-to-end (latest v1.1.0 run) with:

Error 422: Validation Failed: target_commitish is invalid; tag_name is not a valid tag

Cause

release.yaml passes the full ref as branch, and create_release.yaml prepends refs/heads/ again:

branch: ${{ github.ref }}                  # refs/heads/main
commit: refs/heads/${{ inputs.branch }}    # refs/heads/refs/heads/main (invalid)

Fix

In .github/workflows/release.yaml:

  1. branch: ${{ github.ref }} becomes ${{ github.ref_name }}, giving a valid refs/heads/main.
  2. Prefix version with v in the tag-exists check and release version, producing v1.1.0 to match the existing v1.0.x tags, release_js_project.yaml, and the release-proposal git describe --match 'v*'. Also repairs the idempotency check that looked for a bare 1.1.0 tag.

Scope

Affects only this repo's self-release. Consumers use release_js_project.yaml and are unaffected.

release.yaml passed github.ref (refs/heads/main) as the branch to
create_release.yaml, which prepends refs/heads/ again, producing an
invalid target_commitish (refs/heads/refs/heads/main). This caused the
release run to fail with 'Validation Failed: target_commitish is invalid'.

Use github.ref_name (main) so the resulting commitish is refs/heads/main.

Also prefix the version with 'v' in both the tag-exists check and the
release version, matching the historical tag scheme (v1.0.x) and the
consumer-facing release_js_project.yaml. This fixes the release tag/name
(v1.1.0 instead of 1.1.0) and repairs the idempotency guard, which
previously checked for a bare '1.1.0' tag that never exists.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@bosesuneha
Suneha Bose (bosesuneha) merged commit 2ff0844 into Azure:main Jul 31, 2026
2 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.

2 participants