1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00

1530 Commits

Author SHA1 Message Date
Bo-Yi Wu
c8488dc825
feat(gitea): implement Changelog function (#4794)
- Add `strings` package import to `gitea.go`
- Implement `Changelog` function in `gitea.go`
- Update `useGitea` constant in `changelog.go`
- Add test for `useGitea` in `changelog_test.go`
- Update `changelog.md` with information about `gitea` customization

ref:

* Server API: https://github.com/go-gitea/gitea/pull/30349
* SDK: https://gitea.com/gitea/go-sdk/pulls/659

---------

Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-22 23:26:13 -03:00
Carlos Alexandro Becker
b45c3b1720
fix(bluesky): change default env, fix user agent, update tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-22 23:25:00 -03:00
Josh Ghiloni
de72cab5d9
feat(announce): add BlueSky support (#4779)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

If applied, this commit will allow users to create BlueSky posts
(skeets) about their Goreleaser-built projects

<!-- Why is this change being made? -->

Because I wanted to post to BlueSky when projects I work on relating to
BlueSky are built!

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

Example post made during unit testing (requires an account to see):
https://bsky.app/profile/jaygles.bsky.social/post/3kpv573c2pc2k

---------

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-22 23:15:26 -03:00
Carlos Alexandro Becker
3cd2e07c68
feat: notarize macos binaries (#4774)
this includes anchore/quill as a pipe to sign and notarize macos
binaries

TODO:

- [x] find a way to test this
- [x] docs
- [x] maybe get someone from anchore to take a look?

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-19 22:27:50 -03:00
Carlos Alexandro Becker
262c8dcbfe
chore(deps): update env from v9 to v11 (#4789)
updated env to latest

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-16 22:51:47 -03:00
Carlos Alexandro Becker
1ed1a62b90
fix: winget paths on windows (#4786)
closes  #4785
2024-04-16 20:57:22 -03:00
Carlos Alexandro Becker
5d37c9a5a0
feat: always log build output (#4787)
if the output is not empty, log it with info.

this prevents potentially hiding warnings et al.

on successful builds usually the output is empty anyway.

closes #4782

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-16 20:57:01 -03:00
Stepan Rabotkin
d5fc94a81d
refactor: optimize strings replacers (#4788)
Reuse strings replace instead of recreation
2024-04-16 20:56:45 -03:00
Stepan Rabotkin
56e0f79473
fix(telegram): mdv2escape ProjectName by default (#4784)
This pull request fix case when ProjectName contains any not escaped
symbols
2024-04-15 07:57:45 -03:00
Carlos Alexandro Becker
60a1cccf57
feat: isEnvSet tmpl function (#4775)
useful for conditionally enable/disable things based on whether an env
var is set or not
2024-04-12 11:09:18 -03:00
Carlos Tadeu Panato Junior
780a3a40d9
fix: update SBOM generation to add .json as file type (#4781)
- add the file type in the end of the sbom generated file 
- fix wrong value attribution in the doc example

---------

Signed-off-by: cpanato <ctadeu@gmail.com>
2024-04-12 11:04:55 -03:00
Carlos Alexandro Becker
dabe1f31bf
test(ko): make test more stable 2024-04-08 10:11:34 -03:00
lvyaoting
eba43c289e
chore: fix some comments (#4769)
fix some comments

Signed-off-by: lvyaoting <lvyaoting@outlook.com>
2024-04-08 10:08:09 -03:00
Oleksandr Redko
0a38d90f66
fix: typo in User-Agent header value (#4765)
Corrects typo in the value of the `UserAgentHeaderValue` constant.
2024-04-07 19:46:14 -03:00
Carlos Alexandro Becker
053eccdba0
fix(release): only change release draft status on new releases (#4744)
If we're editing an existing release, do not set it to draft.

Closes #4742
Refs #4626
2024-04-03 13:56:22 -03:00
Carlos Alexandro Becker
22b7daadb4
fix(release): publish tag with skip_upload (#4745)
Closes #4743
Refs #4626
2024-04-03 13:55:54 -03:00
Carlos Alexandro Becker
0ff94f13e4
fix: properly skip docker builds of skipped builds (#4747)
refs https://github.com/orgs/goreleaser/discussions/4469 closes
https://github.com/goreleaser/goreleaser/issues/4746

Also made the error better, and added more details to the docs.
2024-04-03 13:52:07 -03:00
Carlos Alexandro Becker
19160164cf
chore(deps): update go-github 2024-04-02 08:22:48 -03:00
Carlos Alexandro Becker
1af98af0b5
feat(nix): update licenses
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-04-01 11:07:07 -03:00
idnandre
c9ca63ece7
fix: adjust unused function params in client mock package (#4738)
- change unused function parameters to blank identifier
- this change can make golangci-lint (revive) pass
2024-04-01 10:03:06 -03:00
Carlos Alexandro Becker
7fc93995b8
feat: consistently use directory in property names (#4737)
It was a mess of "folder" x "directory", so changed it all to
"directory".

Closes #4732
2024-04-01 10:01:56 -03:00
Carlos Alexandro Becker
1db9347363
feat(archives): format override to 'none' to skip certain goos (#4730)
closes #4644

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-29 16:20:05 -03:00
Carlos Alexandro Becker
8cd325eb5a
fix: support dir in gomod (#4729)
closes https://github.com/orgs/goreleaser/discussions/4728
2024-03-29 10:27:33 -03:00
Carlos Alexandro Becker
2498ea7029
feat: add metadata to the release (#4714)
this will create a metadata artifact and allow to add them to the
release.

closes #4669
closes #4682

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-26 23:41:41 -03:00
German Lashevich
ec7106fdea
feat(git): retry git clone on retriable error (#4725)
This PR adds retry logic to the process of cloning a git repository.
Currently, it retries only if the output of the git clone command
contains the string `Connection reset`.
Probably, there are more cases where retry is reasonable, but I'm not
sure what they are.

The number of retries is hardcoded to 10 with increasing delay between
retries — in the same way as it is done in #4265, which served me as an
example.

The initial use case is described in #4724.
2024-03-26 23:41:25 -03:00
Carlos Alexandro Becker
500be667af
feat(scoop): sync fork before opening PR
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-26 23:34:15 -03:00
Carlos Alexandro Becker
42b6282e46
feat(nix): sync fork before opening PR
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-26 23:34:15 -03:00
Carlos Alexandro Becker
2ecd71ee71
feat(krew): sync fork before opening PR
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-26 23:34:15 -03:00
Carlos Alexandro Becker
b9b8a65618
feat(brew): sync fork before opening PR
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-26 23:34:15 -03:00
Carlos Alexandro Becker
3687c097cd
feat(winget): sync fork before opening PR
closes https://github.com/goreleaser/goreleaser/issues/4720

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-26 23:34:15 -03:00
Carlos Alexandro Becker
05e8b33a89
fix: use new refresh func 2024-03-20 10:55:42 -03:00
Carlos Alexandro Becker
dc0de4ce59
fix: artifact filtering 2024-03-20 00:53:51 -03:00
Carlos Alexandro Becker
af97e63dd3
fix: improve artifact refresh and filtering 2024-03-20 00:49:34 -03:00
Carlos Alexandro Becker
08851dce61
fix(aur): allow to have multiple AUR configs pointing to the same repo (#4712)
- using the sha256 of the git url as repo name so we avoid race
conditions
- actually made the git client have a global lock so it doesn't step
over itself

closes #4679

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-19 23:53:08 -03:00
Carlos Alexandro Becker
6e0f426339
feat: allow to delete existing artifacts in the release (#4711)
closes #4692
2024-03-19 23:25:42 -03:00
Brad Reynolds
56c5a09f9a
feat: support projectID for gitlab CreateFile (brew, nix, etc) (#4705)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->
<!-- If applied, this commit will... -->

Allow for using a projectID for a gitlab homebrew tap destination. There
are still some issues here because I can't use our full project name but
one step at a time.

<!-- Why is this change being made? -->

According to the goreleaser [gitlab
doc](https://goreleaser.com/customization/release/#gitlab), gitlab's
project IDs are supported. Before this change that isn't true for
homebrew formulas.

<!-- # Provide links to any relevant tickets, URLs or other resources
-->
Some conversation here:
https://github.com/goreleaser/goreleaser/issues/4664#issuecomment-1986056251.

Co-authored-by: Brad Reynolds <brad@shipium.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-17 15:26:04 -03:00
Carlos Alexandro Becker
54ee014b50
feat: checksums.split (#4707)
closes #4618
closes #4641

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-17 15:16:50 -03:00
Carlos Alexandro Becker
280e68431a
test: move test to the right package
refs c9068b4b3c6ca3bff2a23c1c3af90f562bd16d17

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-17 14:43:21 -03:00
Maxime Brunet
b614d646ef
feat: support netbsd/arm64 (#4706)
Add support for `goos=netbsd`,`goarch=arm64` build target

Supported since golang/go@d23cba683e. Like
`freebsd/arm64`, it is not documented in the [official
list](https://go.dev/doc/install/source#environment)
2024-03-17 14:35:55 -03:00
Carlos Alexandro Becker
c9068b4b3c
fix: properly template builds.gobinary
closes #4685
2024-03-16 11:50:51 -03:00
Carlos Alexandro Becker
0a272037b3
fix: only build archlinux and aur for supported arches (#4695)
closes #4693

see https://wiki.archlinux.org/title/Frequently_asked_questions
2024-03-16 11:40:57 -03:00
standstaff
994d01a0ce
fix: remove repetitive words (#4701)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: standstaff <zhengxingru@yeah.net>
2024-03-15 09:49:32 -03:00
世界
6f356ffcfa
fix: do not log release published if it is a draft (#4691)
it's a bit scary

---------

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-03-14 22:47:08 -03:00
Vedant
263cd059f2
feat(winget): update manifest version to 1.6.0 (#4658)
Use the latest schema `1.6.0` available on winget-pkgs.

The new schema supports some new fields, but they do not affect
goreleaser. Hence, this PR is safe to merge, like
https://github.com/goreleaser/goreleaser/pull/4298 was 👍🏻
2024-02-27 09:51:44 -03:00
Carlos Alexandro Becker
4d2bcfdc46
feat(brew): allow to set headers in the url (#4648)
closes  #4647

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-26 17:22:12 -03:00
Oleksandr Redko
305663fb5d
test: simplify error asserts with require.ErrorContains (#4640)
The PR refactors tests:
- change two lines `require.Error + require.Contains` with one
`require.ErrorContains`;
- change `require.Error + require.Equal` with `require.EqualError`.
2024-02-19 16:28:06 -03:00
Kirill Nikolaev
ef90821ee7
feat(pipe/release): Mark GitHub releases as non-draft only after all artifacts are uploaded. (#4626)
Previously end-users would see missing artifacts if trying to use latest
version while artifacts are being uploaded.

This currently applies only to GitHub releases. GitLab does not support
drafts, and I don't dare to make the change for Gitea since I don't use
it (and can't test easily).

---------

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-19 12:50:47 +00:00
Carlos Alexandro Becker
42d2db2021
feat(nfpm): compression, fields, and predends on debs (#4632)
refs #4630

<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-19 08:51:36 -03:00
Carlos Alexandro Becker
d9e9e82ca7
feat(nfpm): also allow $NFPM_PASSPHRASE (#4633)
refs #4630

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-02-19 08:51:30 -03:00
Oleksandr Redko
a9c76d7655
chore: fix all existing lint issues (#4637)
The PR fixes lint issues, pins `golangci-lint` to `v1.56.2`, disables
`only-new-issues`, and enables `fail-on-issues` in the lint workflow.
After this, all new lint issues will fail CI.

The full log of fixed lint issues:
```sh
❯ golangci-lint run
cmd/docs.go:24:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
cmd/man.go:26:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
cmd/healthcheck.go:36:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
cmd/build.go:72:33: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: timedRunE("build", func(cmd *cobra.Command, args []string) error {
                                              ^
cmd/schema.go:29:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                RunE: func(cmd *cobra.Command, args []string) error {
                           ^
internal/pipe/nix/nix_test.go:547:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectDefaultErrorIs)
                                ^
internal/pipe/nix/nix_test.go:556:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectRunErrorIs)
                                ^
internal/pipe/nix/nix_test.go:567:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectPublishErrorIs)
                                ^
internal/pipe/winget/winget_test.go:709:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectPublishErrorIs)
                                ^
internal/pipe/winget/winget_test.go:728:5: error-is-as: second argument to require.ErrorAs should not be *error (testifylint)
                                require.ErrorAs(t, err, &tt.expectPublishErrorIs)
                                ^
internal/pipe/docker/docker_test.go:56:29: unused-parameter: parameter 'use' seems to be unused, consider removing or renaming it as _ (revive)
                return func(t *testing.T, use string) {
                                          ^
internal/gio/safe_test.go:23:4: go-require: require must only be used in the goroutine running the test function (testifylint)
                        require.Equal(t, 1, s)
                        ^
internal/gio/safe_test.go:24:4: go-require: require must only be used in the goroutine running the test function (testifylint)
                        require.NoError(t, err)
                        ^
internal/pipe/gomod/gomod_proxy_test.go:126:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/pipe/gomod/gomod_proxy_test.go:152:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/pipe/gomod/gomod_proxy_test.go:178:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/pipe/gomod/gomod_proxy_test.go:239:3: useless-assert: asserting of the same variable (testifylint)
                require.Equal(t, ctx.ModulePath, ctx.ModulePath)
                ^
internal/artifact/artifact_test.go:638:46: unused-parameter: parameter 'a' seems to be unused, consider removing or renaming it as _ (revive)
                require.EqualError(t, artifacts.Visit(func(a *Artifact) error {
                                                           ^
internal/pipe/milestone/milestone.go:79: File is not `gofumpt`-ed (gofumpt)

internal/http/http_test.go:217:19: unused-parameter: parameter 'k' seems to be unused, consider removing or renaming it as _ (revive)
        assetOpen = func(k string, a *artifact.Artifact) (*asset, error) {
                         ^
internal/middleware/logging/logging_test.go:12:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        require.NoError(t, Log("foo", func(ctx *context.Context) error {
                                           ^
internal/middleware/logging/logging_test.go:16:40: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
        require.NoError(t, PadLog("foo", func(ctx *context.Context) error {
                                              ^
internal/pipe/chocolatey/chocolatey_test.go:277:15: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
                        exec: func(cmd string, args ...string) ([]byte, error) {
                                   ^
internal/client/gitlab.go:325: File is not `gofumpt`-ed (gofumpt)

internal/pipe/linkedin/client_test.go:58:77: unused-parameter: parameter 'req' seems to be unused, consider removing or renaming it as _ (revive)
        server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
                                                                                   ^
internal/middleware/errhandler/error_test.go:15:34: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, Handle(func(ctx *context.Context) error {
                                               ^
internal/middleware/errhandler/error_test.go:21:34: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, Handle(func(ctx *context.Context) error {
                                               ^
internal/middleware/errhandler/error_test.go:27:32: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.Error(t, Handle(func(ctx *context.Context) error {
                                             ^
internal/middleware/errhandler/error_test.go:36:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, memo.Wrap(func(ctx *context.Context) error {
                                                  ^
internal/middleware/errhandler/error_test.go:42:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, memo.Wrap(func(ctx *context.Context) error {
                                                  ^
internal/middleware/errhandler/error_test.go:48:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                require.NoError(t, memo.Wrap(func(ctx *context.Context) error {
                                                  ^
internal/pipe/ko/ko.go:175:29: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
                build.WithBaseImages(func(ctx stdctx.Context, s string) (name.Reference, build.Result, error) {
                                          ^
```
2024-02-19 08:49:39 -03:00