github.com/ahmet2mir/goreleaser@v0.180.3-0.20210927151101-8e5ee5a9b8c5/www/docs/ci/drone.md (about)

     1  # Drone
     2  
     3  By default, drone does not fetch tags. `plugins/git` is used with default values,
     4  in most cases we'll need overwrite the `clone` step enabling tags in order to make
     5  `goreleaser` work correctly.
     6  
     7  In this example we're creating a new release every time a new tag is pushed.
     8  Note that you'll need to enable `tags` in repo settings and add `github_token`
     9  secret.
    10  
    11  #### 1.x
    12  ```yaml
    13  # .drone.yml
    14  
    15  kind: pipeline
    16  name: default
    17  
    18  steps:
    19    - name: fetch
    20      image: docker:git
    21      commands:
    22        - git fetch --tags
    23  
    24    - name: test
    25      image: golang
    26      volumes:
    27        - name: deps
    28          path: /go
    29      commands:
    30        - go test -race -v ./... -cover
    31  
    32    - name: release
    33      image: golang
    34      environment:
    35        GITHUB_TOKEN:
    36          from_secret: github_token
    37      volumes:
    38        - name: deps
    39          path: /go
    40      commands:
    41        - curl -sL https://git.io/goreleaser | bash
    42      when:
    43        event: tag
    44  
    45  volumes:
    46    - name: deps
    47      temp: {}
    48  ```
    49  
    50  #### 0.8
    51  ```yaml
    52  pipeline:
    53    clone:
    54      image: plugins/git
    55      tags: true
    56  
    57    test:
    58      image: golang:1.10
    59      commands:
    60        - go test ./... -race
    61  
    62    release:
    63      image: golang:1.10
    64      secrets: [github_token]
    65      commands:
    66        curl -sL https://git.io/goreleaser | bash
    67      when:
    68        event: tag
    69  ```
    70