1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-10-08 23:12:05 +02:00

1957 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
744dcac177 fix(blob): disable ssl param name (#6048)
see https://github.com/google/go-cloud/pull/3617

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-11 17:54:16 -03:00
Carlos Alexandro Becker
bd3743dd11 fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-08 10:49:23 -03:00
Frenchie
26c809779f fix(schema): Introduce BinarySign struct to fix schema bug (#6058)
This PR fixes the bug discussed in
[discussion#6057](https://github.com/orgs/goreleaser/discussions/6057).

The schema & schema-pro incorrectly return 9 valid options for
`binary_signs` -> `artifacts` instead of two supported: `none | binary`.
As a result, language servers report 9 valid options, and `gorelease
check` succeeeds but actual signing fails.
Language server incorrect values:
<img width="206" height="293" alt="Screenshot 2025-09-08 at 16 40 44"
src="https://github.com/user-attachments/assets/de4e5511-36a4-4323-a350-0851bb8858c3"
/>

check passes, signing fails:
```
$ goreleaser check
  • checking                                  path=.goreleaser.yaml
  • 1 configuration file(s) validated
  • thanks for using GoReleaser!
...
  • signing binaries
invalid list of artifacts to sign: all
Error: The process '/opt/hostedtoolcache/goreleaser-action/2.12.0/x64/goreleaser' failed with exit code 1
```


If applied, this commit will introduce `BinarySign` to resolve the bug
in the schema, to align with the documentation & actual behaviour of the
code.

tests updated in `internal/pipe/sign/sign_binary_test.go` and a small
`toSign` wrapper to ensure backwards compatibility with existing
`sign()`.

Build succeeds locally:
```
go build -o goreleaser .  
➜  goreleaser git:(fix/binary_sign) ./goreleaser --version
  ____       ____      _
 / ___| ___ |  _ \ ___| | ___  __ _ ___  ___ _ __
| |  _ / _ \| |_) / _ \ |/ _ \/ _` / __|/ _ \ '__|
| |_| | (_) |  _ <  __/ |  __/ (_| \__ \  __/ |
 \____|\___/|_| \_\___|_|\___|\__,_|___/\___|_|
goreleaser: Release engineering, simplified.
https://goreleaser.com

GitVersion:    v2.12.1-0.20250908073636-c8b464ad5be4
GitCommit:     c8b464ad5be4972e5daec0678cef317e6a89de01
GitTreeState:  clean
BuildDate:     2025-09-08T07:36:36
BuiltBy:       unknown
GoVersion:     go1.25.1
Compiler:      gc
ModuleSum:     unknown
Platform:      darwin/arm64
```

`task ci` fails due to what seems like an unrelated error? 
```
--- FAIL: TestBuild (1.17s)
    build_test.go:123:
        	Error Trace:	./goreleaser/internal/builders/poetry/build_test.go:123
        	Error:      	Received unexpected error:
        	            	chtimes: dist/proj-all-all/--py3-none-any.whl: chtimes dist/proj-all-all/--py3-none-any.whl: no such file or directory
        	Test:       	TestBuild
FAIL
```

---------

Signed-off-by: Frenchie <frenchie@ensignia.co>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-08 10:37:56 -03:00
Carlos Alexandro Becker
6f7199efbd fix(docker/v2): properly set manifest annotations (#6053)
When we build a manifest, we need to prefix the annotation key with
`index:`.

This does it automatically :)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-05 15:33:26 -03:00
Carlos Alexandro Becker
1f75831706 fix(docker/v2): improve error message
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-04 21:09:06 -03:00
Carlos Alexandro Becker
60a6c65ac3 fix(docker/v2): do not warn skip docker/v2 on production builds (#6047)
It is a bit confusing.

Resolved by splitting the pipes into two, one that is automatically
skipped in non-snapshot builds, so it doesn't log anything.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-03 17:00:47 -03:00
Carlos Alexandro Becker
12f7f48560 fix(blob): artifact filter
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-03 14:54:08 -03:00
actions-user
a322ee2bca chore: auto-update generated files 2025-09-03 02:57:11 +00:00
dependabot[bot]
cd68460099 chore(deps): bump code.gitea.io/sdk/gitea from 0.21.0 to 0.22.0 (#6029)
Bumps code.gitea.io/sdk/gitea from 0.21.0 to 0.22.0.


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=code.gitea.io/sdk/gitea&package-manager=go_modules&previous-version=0.21.0&new-version=0.22.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-02 00:18:34 -03:00
Carlos Alexandro Becker
924ddc8cff fix(docker/v2): custom publisher
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-09-01 15:34:27 -03:00
Carlos Alexandro Becker
7d25a96eee fix(makeself): lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-29 00:02:54 -03:00
Carlos Alexandro Becker
999a6bd3dd test: improve makeself tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-28 23:56:37 -03:00
Carlos Alexandro Becker
03bcbab867 feat: makeself (#6023)
This builds up on the work of @faisal-smarthub, adding
[makeself](https://makeself.io) support to goreleaser.

I've greatly simplified the original implementation, removing many
options from it as well.

It's still not quite there, though - but it already works and can be
tested!

refs #5989 
refs #5994 

---

#### TODO

- [x] initial implementation 
- [x] extract the improved artifact filtering into its own PR
- [x] tests
- [x] double check docs 
- [x] move goreleaser's setup.sh into some directory
- [x] make sure CI passes

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Faisal <faisal@smarthub.ai>
Co-authored-by: faisal-smarthub <155343043+faisal-smarthub@users.noreply.github.com>
2025-08-28 22:43:27 -03:00
Carlos Alexandro Becker
142d972b0a refactor: simplify function call
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-27 23:04:38 -03:00
Carlos Alexandro Becker
70ab6559df refactor: improved artifact filters (#6024)
Instead of repeating `Or(BySomething(), BySomething())`, added
pluralized versions of some filters that automatically do that.

Refactored some of the usage to use these new functions as well.

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-27 22:56:24 -03:00
Carlos Alexandro Becker
e881586974 test(docker/v2): fix broken test
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-25 14:00:14 -03:00
Carlos Alexandro Becker
72503f03f4 fix(docker/v2): lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-25 13:20:55 -03:00
Carlos Alexandro Becker
378d8c48b9 feat(bun): support more targets (#6019)
closes https://github.com/orgs/goreleaser/discussions/6014

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-24 16:36:58 -03:00
Carlos Alexandro Becker
158a2ebb6b test: fix
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-24 00:49:41 -03:00
Carlos Alexandro Becker
9983babd76 fix(docker/v2): tag suffix on windows
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-24 00:34:28 -03:00
Carlos Alexandro Becker
6cc6adf212 test(docker/v2): more tests
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-24 00:11:13 -03:00
Carlos Alexandro Becker
7a87c438eb fix(docker/v2): dockerfile not being copied properly
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-24 00:04:50 -03:00
Carlos Alexandro Becker
029042f821 refactor(docker/v2): move build to another func
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-23 23:29:25 -03:00
Carlos Alexandro Becker
1a4d726286 refactor(docker/v2): rename func
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-23 23:25:31 -03:00
Carlos Alexandro Becker
6d4fb882b5 fix(docker/v2): remove unneeded if
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-23 23:25:19 -03:00
Carlos Alexandro Becker
03c298dc9d fix(digest): double space
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-23 22:03:38 -03:00
Carlos Alexandro Becker
46d6a86d1b fix(docker/v2): several fixes (#6013)
- grab the correct digest
- error if tag templates eval to empty list
- when `--snapshot`, build one image per platform instead of the
manifest

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-21 23:09:41 -03:00
Carlos Alexandro Becker
d7b45d130a feat(docker/v2): support annotations (#6011)
needs #5793

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-21 21:32:47 -03:00
Carlos Alexandro Becker
72a00ef6df feat(docker/v2): support arbitrary flags (#6012)
needs #5793

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-21 21:28:47 -03:00
Carlos Alexandro Becker
102762f27c feat(docker/v2): initial implementation (#5793)
This is the v2 of the docker feature!

- better DX (less yaml repetition and templates)
- simpler implementation 

### So now, what happens:

- if `--snapshot`, it'll build the manifest, but not push it (only
useful to test the actual docker image build, not the image itself)
- otherwise, on publish, it'll run a single `docker buildx build` to
build and publish the manifest + SBOM
- `docker_signs` should still work
- `docker_digests` should still work

Discussion for after the merge:
https://github.com/orgs/goreleaser/discussions/6005

### TODO from the top of my head:

- [x] ~~pro: split/merge wiring~~[^1]
- [x] tests
- [x] signing
- [x] sbom
- [x] attestations https://github.com/goreleaser/goreleaser/pull/6001

---

closes #5733 

[^1]: Not really needed, will only run in publish, which runs in the
merging step.

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-21 17:28:39 -03:00
Carlos Alexandro Becker
6a541035d8 feat(docker): create images digest file for attestation (#6001)
closes #4852
refs https://github.com/actions/attest-build-provenance/issues/454

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-20 21:26:53 -03:00
Carlos Alexandro Becker
3dcded4d35 fix(cask): conflicts_with formula was deprecated (#5996)
refs https://github.com/Homebrew/brew/pull/20499
refs https://github.com/orgs/goreleaser/discussions/5995

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-20 12:01:20 -03:00
Carlos Alexandro Becker
7c9595e3e6 test(cask): update golden file
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-15 16:24:49 -03:00
Kentaro Suzuki
9fcddb2daf docs(cask): improve example of homebrew casks (#5944)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

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

-->

> [!NOTE]
> It is recommended to review the changes commit by commit.





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

This PR improves the sample code of Homebrew Casks in this two way:

- More consistent github api token retrieval behavior between download
url and fetching release assets.
- `GitHub.get_release` uses different token retrieval than
`GitHubHelper.github_token`
- More safe way to run `/usr/bin/xattr` on macOS only
  - The current example causes unexpected errors when run on Linux

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

This change is based on @mltokky 's blog post:
https://zenn.dev/mltokky/articles/96a9017e583592

The blog post mentions some practical issues with the sample code I
created that I believe require correction.

Therefore, after requesting @mltokky 's review, I would like to add them
as a co-author to the relevant commit.
<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

---------

Co-authored-by: Tokkyer Midlow <mltokky@gmail.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-15 16:24:02 -03:00
Carlos Alexandro Becker
e55afcd56e fix(cask): pass audit (#5987)
- callers need to add the `url.verified` property if they want to pass
audit
- added the name which was missing
- I _think_ the problem with "unversioned url" is that it doesn't have
`#{version}` in it, if so, this should fix it I think

refs https://github.com/orgs/goreleaser/discussions/5963

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-15 14:34:53 -03:00
Carlos Alexandro Becker
a42cfdd564 fix(scoop): add newline to eof (#5985)
see https://github.com/orgs/goreleaser/discussions/5962

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-15 11:02:10 -03:00
Carlos Alexandro Becker
152c3c1d50 fix(brew): use && instead of and (#5986)
according to some users, linuxbrew might complain for the `and` syntax:
https://github.com/orgs/goreleaser/discussions/5947

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-15 10:16:48 -03:00
Carlos Alexandro Becker
41a1c0782b fix(golang): only warn experimental/unstable targets if not filtered out
refs #5951

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-15 01:21:52 -03:00
Carlos Alexandro Becker
dec07447ee feat: retry docker manifest, retry configurations (#5978)
- adds avast/retry in favor of our manual retries here and there
- makes retries configurable for docker images and manifests
- use retries in docker manifest create and push

closes #5967
fixes #5853

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-14 11:24:13 -03:00
Carlos Alexandro Becker
2b7402fef3 feat: update to go 1.25 (#5971)
- [x] docker image (not released yet)
- [x] golangci-lint (not released yet)

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-08-14 10:20:05 -03:00
Carlos Alexandro Becker
193d2cd9fd feat(upload,artifactory): allow to set a password field, tmpl username (#5949)
This, in conjunction with #5948, will allow users to read the password
of a given `artifactory` or `upload` configuration from a file, example:

```yaml
artifactories:
- password: '{{ readFile "~/.artifactory.txt" }}'
  # ...
uploads:
- password: '{{ readFile "~/.myapi.txt" }}'
  # ...
```

closes #5946
2025-08-06 22:21:23 -03:00
Carlos Alexandro Becker
51ee020689 feat(tmpl): readFile and mustReadFile (#5948)
This should allow users to manually read secrets from files whilst
configuring something, e.g.:

```yaml
env:
  FOO_SECRET: '{{ mustReadFile "./secret.txt" }}'
```
2025-08-05 19:50:55 -03:00
Carlos Alexandro Becker
75110a1751 feat(golang): update allowed targets (#5951)
- add the concept of experimental and broken targets
- added openbsd/riscv64 as an experimental target (added in go1.23)
- moved windows/arm into the broken target list (marked in go1.25, will
be removed in go1.27)
- added `rva23u64` to `GORISCV64` (added in go1.26)

closes https://github.com/orgs/goreleaser/discussions/5939
2025-08-05 19:49:53 -03:00
Carlos Alexandro Becker
bb56356432 fix(gitlab): missing PR footer (#5950)
GitHub PR opener sets our footer, gitlab's was missing that.
2025-08-04 23:58:54 -03:00
Carlos Alexandro Becker
3d51f80d6a fix(shell): prevent panic on empty commands (#5929)
it might happen that the string is templated, but it evals to empty, in
which case shell was panicking.

this should fix it

https://github.com/orgs/goreleaser/discussions/5928
2025-07-27 10:52:10 -03:00
Carlos Alexandro Becker
95c6136114 chore(deps): update github to v74 (#5926)
update dep to next major
2025-07-24 22:13:51 -03:00
Carlos Alexandro Becker
58ac17ae87 fix: make brews deprecation "soft" (#5924)
it's not too easy to remove/switch this, and if someone runs `goreleaser
check` in their CI, this will make it fail.

eventually we could add a better mechanism for this, but since this is a
one-off thing for now, added a warning for it.
2025-07-24 15:30:04 -03:00
Carlos Alexandro Becker
63a4e0abc1 fix(aur): quotting when binary (#5914)
fixed unclosed quote.
2025-07-21 17:15:07 -03:00
Carlos Alexandro Becker
58cccd0835 fix: exec.CommandContext (#5913)
fixed some `exec.Command` calls to pass the context within.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-07-21 17:14:54 -03:00
Carlos Alexandro Becker
37ecf0bbf2 fix(s3): acls not working on aws sdk v2 (#5904)
refs https://github.com/orgs/goreleaser/discussions/5901

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-07-17 16:50:21 -03:00