In my typescript project repository, our release policy states that we publish packages from the master branch to the next npm tag. Additionally, we have a dedicated branch called release for publishing to the latest npm tag. My goal is to optimize the solution so that it only runs when a new tag is pushed to one of these branches.
- When a tag is pushed to the master branch, I want to trigger a job that publishes to the next npm tag.
- Similarly, if a tag is pushed to the release branch, I need a job to publish to the latest npm tag.
The issue I'm facing is that in the Github context, the `ref` variable always equals the tag name regardless of the branch I push to. This makes it difficult to determine which branch I am working in. How can I resolve this?