1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-26 04:22:05 +02:00

29 lines
423 B
Go
Raw Normal View History

2017-01-14 14:06:57 -02:00
package env
import (
"errors"
"os"
"github.com/goreleaser/releaser/context"
)
var ErrMissingToken = errors.New("Missing GITHUB_TOKEN")
// Pipe for env
type Pipe struct{}
// Name of the pipe
func (Pipe) Name() string {
return "Env"
}
// Run the pipe
func (Pipe) Run(ctx *context.Context) (err error) {
token := os.Getenv("GITHUB_TOKEN")
if token == "" {
return ErrMissingToken
}
ctx.Token = &token
return
}