wangyoucao577 / go-release-action

Automatically publish Go binaries to Github Release Assets through Github Action.
https://github.com/marketplace/actions/go-release-binaries
MIT License
492 stars 76 forks source link

ldflags is ignored for multi binaries builds #171

Open securitym0nkey opened 4 months ago

securitym0nkey commented 4 months ago

When setting multi_binaries: true the ldflag argument is ignored.

wangyoucao577 commented 3 months ago

Nowadays there's better way to replace ldflags, see more in https://github.com/wangyoucao577/go-release-action/issues/152#issuecomment-1943581310

securitym0nkey commented 3 months ago

Thanks, indeed that seems much better. Changed my project to not use ldflags for injection of version information. Though i think for other use cases of linker options it might be still useful.

wangyoucao577 commented 3 months ago

Sure. Actually it's just caused by missed passing flags here https://github.com/wangyoucao577/go-release-action/blob/ec68290905b5e90fcab97069f9546af4303dd91a/release.sh#L107C1-L108C1, and can be fixed if someone really needs it. PR is welcome as well.