I have a case that in the staging environment we are not using the tags but a release-candidate branch, so I'm expecting to have a release candidate branch name as the version.
I noticed that only the refs/tags/ is stripped, so when setting version with ${{ github.ref }} it complains the slashes are not permitted.
I'm wondering if we can enhance the following regex process to allow strip the prefix for refs/heads as well?
|
// If the users passes in `${{github.ref}}, then it will have an unwanted prefix. |
|
version = versionOption.replace(/^(refs\/tags\/)/, ''); |
I have a case that in the staging environment we are not using the tags but a release-candidate branch, so I'm expecting to have a release candidate branch name as the version.
I noticed that only the
refs/tags/is stripped, so when settingversionwith${{ github.ref }}it complains the slashes are not permitted.I'm wondering if we can enhance the following regex process to allow strip the prefix for refs/heads as well?
action-release/src/options.ts
Lines 14 to 15 in 62ef65f