2022-04-14 14:23:09 -03:00
|
|
|
# Nightlies
|
2021-09-24 20:18:52 -03:00
|
|
|
|
2024-07-08 23:30:10 -03:00
|
|
|
{% include-markdown "../includes/pro.md" comments=false %}
|
2021-09-24 20:18:52 -03:00
|
|
|
|
2022-09-17 00:13:09 -03:00
|
|
|
Whether if you need beta builds or a rolling-release system, the nightly builds
|
|
|
|
feature will do it for you.
|
2021-09-24 20:18:52 -03:00
|
|
|
|
2024-07-08 23:30:10 -03:00
|
|
|
To enable it, you must use the `--nightly` flag in the
|
|
|
|
[`goreleaser release` command](../cmd/goreleaser_release.md).
|
2021-09-24 20:18:52 -03:00
|
|
|
|
|
|
|
You also have some customization options available:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
# .goreleaser.yml
|
|
|
|
nightly:
|
|
|
|
# Allows you to change the version of the generated nightly release.
|
|
|
|
#
|
2022-09-17 00:13:09 -03:00
|
|
|
# Note that some pipes require this to be semantic version compliant (nfpm,
|
|
|
|
# for example).
|
2021-09-24 20:18:52 -03:00
|
|
|
#
|
2024-06-19 11:44:22 -03:00
|
|
|
# Default: `{{ incpatch .Version }}-{{ .ShortCommit }}-nightly`.
|
|
|
|
# Templates: allowed.
|
|
|
|
name_template: "{{ incpatch .Version }}-devel"
|
2022-08-21 16:30:00 -03:00
|
|
|
|
|
|
|
# Tag name to create if publish_release is enabled.
|
|
|
|
tag_name: devel
|
|
|
|
|
|
|
|
# Whether to publish a release or not.
|
|
|
|
# Only works on GitHub.
|
|
|
|
publish_release: true
|
|
|
|
|
2022-09-17 00:13:09 -03:00
|
|
|
# Whether to delete previous pre-releases for the same `tag_name` when
|
|
|
|
# releasing.
|
2022-08-21 16:30:00 -03:00
|
|
|
# This allows you to keep a single pre-release.
|
|
|
|
keep_single_release: true
|
2021-09-24 20:18:52 -03:00
|
|
|
```
|
|
|
|
|
|
|
|
## How it works
|
|
|
|
|
2022-09-17 00:13:09 -03:00
|
|
|
When you run GoReleaser with `--nightly`, it will set the `Version` template
|
|
|
|
variable to the evaluation of `nightly.name_template`. This means that if you
|
|
|
|
use `{{ .Version }}` on your name templates, you'll get the nightly version.
|
2021-09-24 20:18:52 -03:00
|
|
|
|
2024-07-08 23:30:10 -03:00
|
|
|
{% include-markdown "../includes/templates.md" comments=false %}
|
2021-09-24 20:18:52 -03:00
|
|
|
|
|
|
|
## What is skipped when using `--nightly`?
|
|
|
|
|
|
|
|
- Go mod proxying;
|
2022-08-21 16:30:00 -03:00
|
|
|
- GitHub/GitLab/Gitea releases (unless specified);
|
2021-09-24 20:18:52 -03:00
|
|
|
- Homebrew taps;
|
|
|
|
- Scoop manifests;
|
2022-04-14 14:57:13 -03:00
|
|
|
- Arch User Repositories;
|
|
|
|
- Krew Plugin Manifests;
|
2021-09-24 20:18:52 -03:00
|
|
|
- Milestone closing;
|
|
|
|
- All announcers;
|
|
|
|
|
2022-08-21 16:30:00 -03:00
|
|
|
Everything else is executed normally.
|
|
|
|
Just make sure to use the `Version` template variable instead of `Tag`.
|
|
|
|
You can also check if it is a nightly build inside a template with:
|
2021-09-24 20:18:52 -03:00
|
|
|
|
|
|
|
```
|
|
|
|
{{ if .IsNightly }}something{{ else }}something else{{ end }}
|
|
|
|
```
|
|
|
|
|
|
|
|
!!! info "Maybe you are looking for something else?"
|
2024-06-19 11:44:22 -03:00
|
|
|
|
2022-09-17 00:13:09 -03:00
|
|
|
- If just want to build the binaries, and no packages at all, check the
|
2024-07-08 23:30:10 -03:00
|
|
|
[`goreleaser build` command](../cmd/goreleaser_build.md);
|
2022-09-17 00:13:09 -03:00
|
|
|
- If you actually want to create a local "snapshot" build, check out the
|
2024-07-08 23:30:10 -03:00
|
|
|
[snapshots documentation](snapshots.md).
|