Skip to content

Conversation

frenchi
Copy link
Contributor

@frenchi frenchi commented Sep 8, 2025

This PR fixes the bug discussed in discussion#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:
Screenshot 2025-09-08 at 16 40 44

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>
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 8, 2025
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.73%. Comparing base (4940a2f) to head (896464b).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6058      +/-   ##
==========================================
+ Coverage   82.72%   82.73%   +0.01%     
==========================================
  Files         168      168              
  Lines       17177    17191      +14     
==========================================
+ Hits        14209    14223      +14     
  Misses       2345     2345              
  Partials      623      623              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frenchi
Copy link
Contributor Author

frenchi commented Sep 8, 2025

Thanks for the review @caarlos0 and thanks for catching the stray quotes - I've fixed that over on goreleaser/goreleaser-pro#32 as well.

@caarlos0 caarlos0 merged commit 26c8097 into goreleaser:main Sep 8, 2025
9 of 12 checks passed
@caarlos0
Copy link
Member

caarlos0 commented Sep 8, 2025

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants