1

I am going through the one of drone yml and i saw the below

when:
      event: tag

am not getting what is mean by tag event , i knew push event like for example

when:
      event: push
      branch: master

means trigger the build step only when i push the code to master branch .

So can anyone explain what is mean tag even ? and when to use the tag event ?

Note : I am using git as source control

Bravo
  • 8,589
  • 14
  • 48
  • 85
  • When you prepare a release you normally create a tag from your main branch. That triggers a tag event. That is merely a placeholder for a stable releasable version of your software. – Mihai Apr 29 '19 at 06:22
  • create a tag from your branch , you mean creating a new branch from present branch ? – Bravo Apr 29 '19 at 08:06
  • tags are not really branches. they look very much alike but you are not supposed to be working on a tag. – Mihai Apr 29 '19 at 08:42

1 Answers1

3

In the same way that push to master event triggers when there is a new git push event to the master branch, the tag event triggers when a new git tag is added to the git repository.

It can be useful for example, when you are using git tags to mark new releases: git tag v1.0.1

Disclaimer: I am not familiar with Drone, but this is how it behaves in similar platforms that do automatic builds and manage build pipelines.

DannyB
  • 12,810
  • 5
  • 55
  • 65