Skip to content

Conversation

@yoannmoinet
Copy link
Member

What and why?

Fix the publish workflow to correctly detect the branch name when triggered by a release event. Previously, when publishing from a release, github.ref_name would return the tag name (e.g., v3.0.9) instead of the branch name, causing the branch validation to fail and preventing packages from being published to NPM.

This was blocking releases as seen in https://github.com/DataDog/build-plugins/actions/runs/21300531101/job/61316867063

How?

  • Updated the "Validate and set channel" step to detect the branch correctly based on the event type:
    • For release events: use github.event.release.target_commitish (the branch the release was created from)
    • For workflow_dispatch events: use github.ref_name (the branch from which the workflow was manually triggered)
  • Added the branch as an output (branch=$BRANCH) to avoid duplicating the detection logic
  • Updated the "Validate and set version" step to read the branch from the previous step's output instead of duplicating the logic

@yoannmoinet yoannmoinet marked this pull request as ready for review January 23, 2026 20:53
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