1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-07-15 01:34:21 +02:00

feat: add metadata to the release (#4714)

this will create a metadata artifact and allow to add them to the
release.

closes #4669
closes #4682

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2024-03-26 23:41:41 -03:00
committed by GitHub
parent ec7106fdea
commit 2498ea7029
18 changed files with 169 additions and 36 deletions

View File

@ -96,7 +96,7 @@ func doUpload(ctx *context.Context, conf config.Blob) error {
return err
}
filter := artifact.Or(
byTypes := []artifact.Filter{
artifact.ByType(artifact.UploadableArchive),
artifact.ByType(artifact.UploadableBinary),
artifact.ByType(artifact.UploadableSourceArchive),
@ -105,7 +105,12 @@ func doUpload(ctx *context.Context, conf config.Blob) error {
artifact.ByType(artifact.Certificate),
artifact.ByType(artifact.LinuxPackage),
artifact.ByType(artifact.SBOM),
)
}
if conf.IncludeMeta {
byTypes = append(byTypes, artifact.ByType(artifact.Metadata))
}
filter := artifact.Or(byTypes...)
if len(conf.IDs) > 0 {
filter = artifact.And(filter, artifact.ByIDs(conf.IDs...))
}