mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
943ef1d81f
* docs: enable instant Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: minify html Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: edit uri Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: remove uneeded meta Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * docs: several improvements Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: broken links Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
71 lines
1.2 KiB
Markdown
71 lines
1.2 KiB
Markdown
# 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.
|
|
|
|
#### 1.x
|
|
```yaml
|
|
# .drone.yml
|
|
|
|
kind: pipeline
|
|
name: default
|
|
|
|
steps:
|
|
- name: fetch
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
|
|
- name: test
|
|
image: golang
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- go test -race -v ./... -cover
|
|
|
|
- name: release
|
|
image: golang
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
volumes:
|
|
- name: deps
|
|
path: /go
|
|
commands:
|
|
- curl -sL https://git.io/goreleaser | bash
|
|
when:
|
|
event: tag
|
|
|
|
volumes:
|
|
- name: deps
|
|
temp: {}
|
|
```
|
|
|
|
#### 0.8
|
|
```yaml
|
|
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
|
|
```
|
|
|