Skip to content

Instantly share code, notes, and snippets.

@fallion
Created July 6, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fallion/8e26045842b05b26335cb042a29952b9 to your computer and use it in GitHub Desktop.
Save fallion/8e26045842b05b26335cb042a29952b9 to your computer and use it in GitHub Desktop.
Drone + GoReleaser: drone.yml
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