github.com/triarius/goreleaser@v1.12.5/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/triarius/goreleaser/internal/exec"
     6  	"github.com/triarius/goreleaser/pkg/context"
     7  )
     8  
     9  // Pipe for custom publisher.
    10  type Pipe struct{}
    11  
    12  // String returns the description of the pipe.
    13  func (Pipe) String() string                 { return "custom publisher" }
    14  func (Pipe) Skip(ctx *context.Context) bool { return len(ctx.Config.Publishers) == 0 }
    15  
    16  // Publish artifacts.
    17  func (Pipe) Publish(ctx *context.Context) error {
    18  	return exec.Execute(ctx, ctx.Config.Publishers)
    19  }