github.com/goreleaser/goreleaser@v1.25.1/internal/pipe/custompublishers/custompublishers.go (about)

     1  // Package custompublishers provides a Pipe that executes a custom publisher
     2  package custompublishers
     3  
     4  import (
     5  	"github.com/goreleaser/goreleaser/internal/exec"
     6  	"github.com/goreleaser/goreleaser/pkg/context"
     7  )
     8  
     9  // Pipe for custom publisher.
    10  type Pipe struct{}
    11  
    12  func (Pipe) String() string                     { return "custom publisher" }
    13  func (Pipe) Skip(ctx *context.Context) bool     { return len(ctx.Config.Publishers) == 0 }
    14  func (Pipe) Publish(ctx *context.Context) error { return exec.Execute(ctx, ctx.Config.Publishers) }