diff --git a/pkg/plugin/discovery/resolver/github/github.go b/pkg/plugin/discovery/resolver/github/github.go index 8e1b5d14e0b9931bc06f28f623179a673fd794c4..50afb64eb22ac5dbde9ca05e83dbcbc75ba46cbe 100644 --- a/pkg/plugin/discovery/resolver/github/github.go +++ b/pkg/plugin/discovery/resolver/github/github.go @@ -18,6 +18,8 @@ import ( "golang.org/x/oauth2" ) +var _ resolver.Resolver = &Resolver{} + type Resolver struct { ghClient *github.Client } @@ -105,6 +107,10 @@ func (g *Resolver) getAllValidGitHubReleases(repoOwner, repoName string) (ghRele continue } + if len(release.Assets) == 0 { + continue + } + if semverTag, err := semver.NewVersion(release.GetTagName()); err == nil { ret = append(ret, &ghRelease{version: semverTag, release: release}) } diff --git a/pkg/plugin/discovery/resolver/github/known_plugins.go b/pkg/plugin/discovery/resolver/github/known_plugins.go index 08228e4af69dbf5c10561b23aed7b6e5e907d8d3..d5426a837bb43de659774bcaa661f9ff1a08b38a 100644 --- a/pkg/plugin/discovery/resolver/github/known_plugins.go +++ b/pkg/plugin/discovery/resolver/github/known_plugins.go @@ -1,17 +1,18 @@ package github var knownPlugins = map[string]string{ - "provider-github": "go-semantic-release/provider-github", - "provider-gitlab": "go-semantic-release/provider-gitlab", - "changelog-generator-default": "go-semantic-release/changelog-generator-default", - "commit-analyzer-default": "go-semantic-release/commit-analyzer-cz", - "condition-default": "go-semantic-release/condition-default", - "condition-github": "go-semantic-release/condition-github", - "condition-gitlab": "go-semantic-release/condition-gitlab", - "files-updater-npm": "go-semantic-release/files-updater-npm", - "provider-git": "go-semantic-release/provider-git", - "condition-bitbucket": "go-semantic-release/condition-bitbucket", - "files-updater-helm": "go-semantic-release/files-updater-helm", - "hooks-goreleaser": "go-semantic-release/hooks-goreleaser", - "hooks-npm-binary-releaser": "go-semantic-release/hooks-npm-binary-releaser", + "provider-github": "go-semantic-release/provider-github", + "provider-gitlab": "go-semantic-release/provider-gitlab", + "changelog-generator-default": "go-semantic-release/changelog-generator-default", + "commit-analyzer-default": "go-semantic-release/commit-analyzer-cz", + "condition-default": "go-semantic-release/condition-default", + "condition-github": "go-semantic-release/condition-github", + "condition-gitlab": "go-semantic-release/condition-gitlab", + "files-updater-npm": "go-semantic-release/files-updater-npm", + "provider-git": "go-semantic-release/provider-git", + "condition-bitbucket": "go-semantic-release/condition-bitbucket", + "files-updater-helm": "go-semantic-release/files-updater-helm", + "hooks-goreleaser": "go-semantic-release/hooks-goreleaser", + "hooks-npm-binary-releaser": "go-semantic-release/hooks-npm-binary-releaser", + "hooks-plugin-registry-update": "go-semantic-release/hooks-plugin-registry-update", } diff --git a/pkg/plugin/discovery/resolver/registry/registry.go b/pkg/plugin/discovery/resolver/registry/registry.go index 6bb8db6c083fa0c8384540b47aa9afb0188aa9cc..9c4532fe83f4b13c390bf2e7981b4799b315f91b 100644 --- a/pkg/plugin/discovery/resolver/registry/registry.go +++ b/pkg/plugin/discovery/resolver/registry/registry.go @@ -13,6 +13,11 @@ import ( "github.com/go-semantic-release/semantic-release/v2/pkg/plugin/discovery/resolver" ) +var ( + _ resolver.Resolver = &Resolver{} + _ resolver.BatchResolver = &Resolver{} +) + type Resolver struct { client *client.Client } diff --git a/pkg/plugin/discovery/resolver/registryV1/registry.go b/pkg/plugin/discovery/resolver/registryV1/registry.go index aa6588fa323568a7d687f9fc95758b1cc4504da7..2f4b2bc32589525b2d99d5845d594defcaee8f4f 100644 --- a/pkg/plugin/discovery/resolver/registryV1/registry.go +++ b/pkg/plugin/discovery/resolver/registryV1/registry.go @@ -14,6 +14,8 @@ import ( const DefaultEndpoint = "https://plugins.go-semantic-release.xyz/api/v1" +var _ resolver.Resolver = &Resolver{} + type Resolver struct { endpoint string }