cli icon indicating copy to clipboard operation
cli copied to clipboard

Try out GoReleaser for release process

Open tashian opened this issue 4 years ago • 4 comments

https://goreleaser.com/intro/

tashian avatar Feb 10 '21 19:02 tashian

In the limitations, goreleaser mentions CGO, that is going to be important when we add CGO and non-CGO binaries, for supporting things like YubiKey and PKCS#11 modules in the cli. But it links to this project https://github.com/troian/golang-cross

maraino avatar Feb 10 '21 19:02 maraino

I've written a basic .goreleaser.yml that builds multiarch binaries, archives, and docker images (non-CGO) using our naming & dir structure conventions.

To try it:

Notes:

  • GoReleaser will build files with a v prefix before the version number eg. step_linux_v0.15.4-rc.4-next_amd64.tar.gz. This is a goreleaser bug, but it only does this for snapshot builds; for actual releases it will not include the v prefix.
  • I changed the Dockerfile to stop building step inside the container. This may break step-ca's docker build process
  • And, when we need CGO support, we'll need to build inside containers anyway.

TODOs to replace current Makefile/GH Actions build process:

(What else?)

Version 2:

  • [ ] Review Docker build — do we push to registries other than DockerHub?
  • [ ] Add CGO support (this will be a fair bit of work - see this Medium post and this issue)
  • [ ] Add Homebrew deployment (this will require step & step-ca pkgs to be separated out & configured w/dependencies. And if we are going to do that, it will make sense to move certificates to GoReleaser first)

tashian avatar Feb 10 '21 23:02 tashian

Is it possible to build with -trimpath?

maraino avatar Feb 16 '21 20:02 maraino

@maraino yes— I've added this.

tashian avatar Feb 17 '21 19:02 tashian