allows to disable a specific custom publisher based on a template, akin
to other pipes.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit adds a `make_latest` boolean to the release configuration,
to allow signaling to GitHub if the release should be marked as latest.
Albeit being a boolean, the internal Go type is a string to allow
to distinguish an empty string (default behavior: `true`) from an
explicit `false`.
For more information around the GitHub API field, see
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
I did not include the `legacy` option, to not adopt something which
appears to be scheduled for removal in the future.
In addition, I opted for `make_latest` over `latest` because the
option is only available for GitHub. Which keeps the latter key
reserved for e.g. future use of a config option which is used across
Git providers.
Fixes#4159
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This adds missing fields:
- LicenseURL
- CopyrightURL
- Tags
As well as make several more fields templateable.
cc/ @twpayne
Co-authored-by: Tom Payne <tom.payne@flarm.com>
We have been using `t.Setenv` is most of our tests. This PR replaces the
remaining `os.Setenv` with `t.Setenv`.
Reference: https://pkg.go.dev/testing#T.Setenv
```go
func TestFoo(t *testing.T) {
// before
os.Setenv(key, "new value")
defer os.Unsetenv(key)
// after
t.Setenv(key, "new value")
}
```
---------
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
nfpm was updated, but we never allowed to configure the umask field in
goreleaser.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
closes#3989
Basically, when some of these pipes fail, the error will be memorized,
and all errors will be thrown in the end.
Meaning: the exit code will still be 1, but it'll not have stopped in
the first error.
Thinking of maybe adding a `--fail-fast` flag to disable this behavior
as well 🤔
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
this will add support to winget into goreleaser.
Basically, the plan is:
- we generate the 3 needed yaml files
- we commit them to a repo
and that's it.
Initially, will probably have limited options support, and will only
have the default locale.
###### TODO
- [x] docs
- [x] review by someone who knows how this works?
- [x] test install somewhere
- [x] more tests maybe?
- [x] PR templates via API?
https://github.com/goreleaser/goreleaser/pull/4105
- [x] real project test
- [x] setup goreleaser to pr to winget as well
- [x] document sync fork stuff
https://github.com/goreleaser/goreleaser/pull/4106
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
pending https://github.com/invopop/jsonschema/pull/79 the jsonschema should also have the correct deprecated markings
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
It should make goreleaser easier to use, as a `repository` is now always
called `repository`.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
since this will be a late, big release, let's remove the deprecated
stuff that expired
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This allows to open pull requests across repositories on nix, brew, krew
and scoop.
closes#4048
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
very, very, very WIP implementation of nixpkgs for GoReleaser.
**Decisions made for this first version:**
- only linux and darwin, arm64, 386 and amd64
- only support pkgs from goreleaser-generated archives
- no support to push into default nixpkgs repository
- no support to automatically add the _maybe_ new pkg to the root
`default.nix`
- the generated nixpkg will be rather verbose, which shouldn't be too
much of an issue as it is autogenerated anyway
**TODOs**:
- [x] macos universal binary support
- [x] custom pkg path (e.g. pkgs/misc/foo/bar/default.nix)
- [x] handle archives with a folder in them
- [x] add more options: postInstall, ??
**Will be handled in future versions**:
- [ ] archives.format=binary support
- [ ] compile from source
- [ ] PR-ing into nixpkgs
- [ ] armv6l-linux & armv7l-linux support
closes#3537
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Adjust the logging of warnings for unmatched globs to only show when the
glob is not a default. No warning will be output for the default globs
when there are no matching files.
These are defaults, by design, very generic.
We should not warn the user about them not finding anything, as that is
their expected behavior most of the time.
this adds a new root-level `upx` config, so users can pack their
binaries with upx :)
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This brings the scoops feature a bit more closer to similar pipes, like
brew and krew.
- It now supports multiple scoops
- It improves some validations to prevent wrong manifests
- It uses extra.binaries instead of extra.builds, as brew does too
- extra.builds is now unused, will be removed in a subsequent PR
- More tests were added as well
closes#3941
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
basically redoing #3559 as it got impossible to merge with the many
changes since it was open (which is totally my fault for not merging it
earlier).
Anyhow, still a WIP, going also doing some other related improvements in
the way.
cc/ @graytonio
closes#3559closes#3525
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Grayton Ward <graytonio.ward@gmail.com>
This adds a log with the size of the generated binaries/packages/etc in
the end of the build process, and also adds it to the artifacts.json
closes#3949
TODO:
- [x] tests
- [x] docs
- [ ] ??
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This now works for files added to the source archive **after** the `git
archive` command is run. During the `git archive`, it seems that the
`tar` is still using some format that doesn't support utf-8 by default.
Tomorrow I'll look more into it.
see https://pkg.go.dev/archive/tar#Formatcloses#3812
---------
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-Authored-By: Mohammed Al Sahaf <msaa1990@gmail.com>
We support `.tar.gz` since the beginning, and `.tar.xz` for a long time.
`.tgz` and `.txz` are just commonly used shorthands for the same
formats.
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This reverts back to using `git archive` for the source archives... but
will keep supporting extra files.
##### How it works:
Basically, we run `git archive` as before.
Then, we make a backup of the generated archive, and create a new one
copying by reading from the backup and writing into the new one.
Finally, we write the extra files to the new one as well.
This only happens if the configuration does have extra files, otherwise,
just the simple `git archive` will be run.
PS: we can't just append to the archive because weird tar format
paddings et al.
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
closes#3485
also fixed a bug in file creation for github: it was always searching
for the file in the default branch
also, we don't need to create the file first, update does both create
and update.
TODO: implement the for krew, scoop, etc...
---------
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>