diff options
author | Thomas Boerger <thomas@webhippie.de> | 2016-12-24 00:00:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-24 00:00:48 +0100 |
commit | 6aacf4d2f09631359b99df562b4bf31dcef44ea3 (patch) | |
tree | 2a551dcc0652a74d2da77cafe1d4233b13f12e85 /.drone.yml | |
parent | 7b67347104629872d4410a61ce8f78eebae40131 (diff) | |
download | gitea-6aacf4d2f09631359b99df562b4bf31dcef44ea3.tar.gz gitea-6aacf4d2f09631359b99df562b4bf31dcef44ea3.zip |
Properly handle drone tags and release/* branches (#466)v1.0.0
Diffstat (limited to '.drone.yml')
-rw-r--r-- | .drone.yml | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/.drone.yml b/.drone.yml index dfa961d24e..12c53d60c3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -56,7 +56,7 @@ pipeline: - make release when: event: [ push, tag ] - branch: [ master, refs/tags/* ] + branch: [ master, release/*, refs/tags/* ] coverage: image: plugins/coverage @@ -67,7 +67,7 @@ pipeline: docker: image: plugins/docker repo: gitea/gitea - tags: [ '${DRONE_TAG}' ] + tags: [ '${DRONE_TAG##v}' ] when: event: [ tag ] branch: [ refs/tags/* ] @@ -75,6 +75,14 @@ pipeline: docker: image: plugins/docker repo: gitea/gitea + tags: [ '${DRONE_BRANCH##release/v}' ] + when: + event: [ push ] + branch: [ release/* ] + + docker: + image: plugins/docker + repo: gitea/gitea tags: [ 'latest' ] when: event: [ push ] @@ -85,20 +93,30 @@ pipeline: path_style: true strip_prefix: dist/release/ source: dist/release/* - target: /gitea/master + target: /gitea/${DRONE_TAG##v} + when: + event: [ tag ] + branch: [ refs/tags/* ] + + release: + image: plugins/s3 + path_style: true + strip_prefix: dist/release/ + source: dist/release/* + target: /gitea/${DRONE_BRANCH##release/v} when: event: [ push ] - branch: [ master ] + branch: [ release/* ] release: image: plugins/s3 path_style: true strip_prefix: dist/release/ source: dist/release/* - target: /gitea/${DRONE_TAG} + target: /gitea/master when: - event: [ tag ] - branch: [ refs/tags/* ] + event: [ push ] + branch: [ master ] github: image: plugins/github-release |