mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-06-28 06:16:01 +00:00
Fix: remove the substring "refs/tags/" in tag_name
Currently, when using github.GITHUB_REF as tag_name, the action will remove the substring "refs/tags/" which prevents uploading asset
This commit is contained in:
parent
e99df7cd80
commit
fa2696fb58
1 changed files with 4 additions and 1 deletions
|
@ -142,8 +142,11 @@ export const release = async (
|
||||||
releaser: Releaser
|
releaser: Releaser
|
||||||
): Promise<Release> => {
|
): Promise<Release> => {
|
||||||
const [owner, repo] = config.github_repository.split("/");
|
const [owner, repo] = config.github_repository.split("/");
|
||||||
|
// using githu_ref only if input_tag_name is empty or equals to github_ref
|
||||||
const tag =
|
const tag =
|
||||||
config.input_tag_name || config.github_ref.replace("refs/tags/", "");
|
!config.input_tag_name || config.input_tag_name === config.github_ref
|
||||||
|
? config.github_ref.replace("refs/tags/", "")
|
||||||
|
: config.input_tag_name;
|
||||||
try {
|
try {
|
||||||
// you can't get a an existing draft by tag
|
// you can't get a an existing draft by tag
|
||||||
// so we must find one in the list of all releases
|
// so we must find one in the list of all releases
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue