From 43adc52de6f06032e3a5de6c09d943cffc5d7959 Mon Sep 17 00:00:00 2001 From: Marvin Steadfast Date: Wed, 9 Dec 2020 08:17:23 +0100 Subject: [PATCH] release only on master branch --- .drone.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2c2b7dd..583a5ad 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,6 +13,21 @@ steps: commands: - make lint + - name: build + image: goreleaser/goreleaser:latest + volumes: + - name: dockersock + path: /var/run + environment: + commands: + - goreleaser build --rm-dist --snapshot + trigger: + event: + exclude: + - tag + depends_on: + - lint + - name: release image: goreleaser/goreleaser:latest volumes: @@ -28,10 +43,14 @@ steps: DOCKER_REGISTRY: quay.io commands: - sleep 5 - - echo $DOCKER_PASSWORD | docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME --password-stdin + - > + echo $DOCKER_PASSWORD | + docker login $DOCKER_REGISTRY -u $DOCKER_USERNAME --password-stdin - goreleaser release - when: - event: tag + trigger: + event: + - tag + branch: master depends_on: - lint