Created
July 6, 2019 09:16
-
-
Save fallion/8e26045842b05b26335cb042a29952b9 to your computer and use it in GitHub Desktop.
Drone + GoReleaser: drone.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: pipeline | |
name: default | |
steps: | |
// Drone does not pull git tags by default | |
- name: fetch | |
image: docker:git | |
commands: | |
- git fetch --tags | |
// Test your go app | |
- name: test | |
image: golang | |
volumes: | |
- name: deps | |
path: /go | |
commands: | |
- go test -race -v ./... -cover | |
// Run goreleaser only on tags | |
- 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 | |
// Save dependencies between steps | |
volumes: | |
- name: deps | |
temp: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment