github.phpd.cn/goreleaser/goreleaser@v0.92.0/internal/pipeline/pipeline.go (about) 1 // Package pipeline provides generic erros for pipes to use. 2 package pipeline 3 4 import ( 5 "fmt" 6 7 "github.com/goreleaser/goreleaser/internal/pipe/archive" 8 "github.com/goreleaser/goreleaser/internal/pipe/before" 9 "github.com/goreleaser/goreleaser/internal/pipe/build" 10 "github.com/goreleaser/goreleaser/internal/pipe/changelog" 11 "github.com/goreleaser/goreleaser/internal/pipe/checksums" 12 "github.com/goreleaser/goreleaser/internal/pipe/defaults" 13 "github.com/goreleaser/goreleaser/internal/pipe/dist" 14 "github.com/goreleaser/goreleaser/internal/pipe/docker" 15 "github.com/goreleaser/goreleaser/internal/pipe/effectiveconfig" 16 "github.com/goreleaser/goreleaser/internal/pipe/env" 17 "github.com/goreleaser/goreleaser/internal/pipe/git" 18 "github.com/goreleaser/goreleaser/internal/pipe/nfpm" 19 "github.com/goreleaser/goreleaser/internal/pipe/publish" 20 "github.com/goreleaser/goreleaser/internal/pipe/sign" 21 "github.com/goreleaser/goreleaser/internal/pipe/snapcraft" 22 "github.com/goreleaser/goreleaser/pkg/context" 23 ) 24 25 // Piper defines a pipe, which can be part of a pipeline (a serie of pipes). 26 type Piper interface { 27 fmt.Stringer 28 29 // Run the pipe 30 Run(ctx *context.Context) error 31 } 32 33 // Pipeline contains all pipe implementations in order 34 var Pipeline = []Piper{ 35 defaults.Pipe{}, // load default configs 36 before.Pipe{}, // run global hooks before build 37 dist.Pipe{}, // ensure ./dist is clean 38 git.Pipe{}, // get and validate git repo state 39 effectiveconfig.Pipe{}, // writes the actual config (with defaults et al set) to dist 40 changelog.Pipe{}, // builds the release changelog 41 env.Pipe{}, // load and validate environment variables 42 build.Pipe{}, // build 43 archive.Pipe{}, // archive in tar.gz, zip or binary (which does no archiving at all) 44 nfpm.Pipe{}, // archive via fpm (deb, rpm) using "native" go impl 45 snapcraft.Pipe{}, // archive via snapcraft (snap) 46 checksums.Pipe{}, // checksums of the files 47 sign.Pipe{}, // sign artifacts 48 docker.Pipe{}, // create and push docker images 49 publish.Pipe{}, // publishes artifacts 50 }