diff --git a/www/content/ci.md b/www/content/ci.md index 05ac62875..474980710 100644 --- a/www/content/ci.md +++ b/www/content/ci.md @@ -70,3 +70,33 @@ deployment: commands: - curl -sL https://git.io/goreleaser | bash ``` + +## Drone + +By default, drone does not fetch tags. `plugins/git` is used with default values, +in most cases we'll need overwrite the `clone` step enabling tags in order to make +`goreleaser` work correctly. + +In this example we're creating a new release every time a new tag is pushed. +Note that you'll need to enable `tags` in repo settings and add `github_token` +secret. + +```yml +pipeline: + clone: + image: plugins/git + tags: true + + test: + image: golang:1.10 + commands: + - go test ./... -race + + release: + image: golang:1.10 + secrets: [github_token] + commands: + curl -sL https://git.io/goreleaser | bash + when: + event: tag +```