github.com/goreleaser/goreleaser@v1.25.1/www/docs/customization/snapshots.md (about)

     1  # Snapshots
     2  
     3  Sometimes we want to generate a full build of our project,
     4  but neither want to validate anything nor upload it to anywhere.
     5  
     6  GoReleaser supports this with the `--snapshot` flag and with the `snapshot`
     7  customization section:
     8  
     9  ```yaml
    10  # .goreleaser.yaml
    11  snapshot:
    12    # Allows you to change the name of the generated snapshot
    13    #
    14    # Note that some pipes require this to be semantic version compliant (nfpm,
    15    # for example).
    16    #
    17    # Default is `{{ .Version }}-SNAPSHOT-{{.ShortCommit}}`.
    18    # Templates: allowed
    19    name_template: "{{ incpatch .Version }}-devel"
    20  ```
    21  
    22  ## How it works
    23  
    24  When you run GoReleaser with `--snapshot`, it will set the `Version` template
    25  variable to the evaluation of `snapshot.name_template`. This means that if you
    26  use `{{ .Version }}` on your name templates, you'll get the snapshot version.
    27  
    28  You can also check if it's a snapshot build inside a template with:
    29  
    30  ```
    31  {{ if .IsSnapshot }}something{{ else }}something else{{ end }}
    32  ```
    33  
    34  !!! tip
    35  
    36      Learn more about the [name template engine](/customization/templates/).
    37  
    38  Note that the idea behind GoReleaser's snapshots is for local builds or to
    39  validate your build on the CI pipeline. Artifacts won't be uploaded and will
    40  only be generated into the `dist` directory.
    41  
    42  !!! info "Maybe you are looking for something else?"
    43  
    44      - If just want to build the binaries, and no packages at all, check the [`goreleaser build` command](/cmd/goreleaser_build/);
    45      - If you actually want to create nightly builds, check out the [nightly documentation](/customization/nightlies/).