[Help] Gitlab release generic package is labeled undefined
I am trying to create a release, and upload an asset to the release that gets saved as a generic package on gitlab. I see in the readme that if the asset path is a glob that only finds one file it should use that file name as the generic package name. But this is not the case. This results in generic package that is my correct file, but it is named "undefined" with no file extension.
I have already verified with an exec plugin that there is in fact only a single .pdf file in my project, and it seems that the fact that the asset labeled undefined being the file contents I desired proves that case.
FYI - I am using ../*.pdf for my path since my semrel config is stored within another directory.
Here is what my config looks like if you are curious:
plugins:
# analyses the Git commits
- - '@semantic-release/commit-analyzer'
- preset: conventionalcommits
# generates the release note from the Git commit messages
- - '@semantic-release/release-notes-generator'
- preset: conventionalcommits
# generates the CHANGELOG.md file
- - '@semantic-release/changelog'
- changelogTitle: "# Changelog"
# GitLab support
- - '@semantic-release/gitlab'
- assets: # save built pdf as generic package
- path: "../*.pdf"
target: "generic_package"
branches:
- master
tagFormat: '${version}'
This seems to be a bug or incorrect functionality in documentation.
At first sorry for the late response @CJP-Whitt!
Does it work if you set the label explicitly?
I have the same problem. The filename is undefined.
This is my configuration:
"@semantic-release/gitlab",
{
"gitlabUrl": CI_SERVER_URL,
"assets": [
{
"path": "Output/my-exe-connector-v${nextRelease.version}.exe",
"target": "generic_package",
"type": "package"
},
]
}
Solved with:
"@semantic-release/gitlab",
{
"gitlabUrl": CI_SERVER_URL,
"assets": [
{
"label": "my-exe-v${nextRelease.version}.exe",
"path": "Output/my-exe-connector-v${nextRelease.version}.exe",
"target": "generic_package",
"type": "package"
},
]
}