syntasso / kratix-cli

CLI-based tool to build Promises
Apache License 2.0
2 stars 1 forks source link

feat: add cli releases #40

Closed kirederik closed 2 months ago

kirederik commented 2 months ago

There's currently no way to consume the Kratix CLI other than cloning and compiling the binary yourself.

Let's improve this by automatically creating releases of the CLI, so the users can download the compiled binary for their OS directly from Github.

We can use release-please with go-releaser to make the entire process very simple.

aclevername commented 2 months ago

Go Releaser investigation

Looking at goreleaser it acts upon the creation of a git tag, it doesn't create the tag for you. It will:

We can use github actions workflow that already exists, or write it by hand in circleci (former is probably easier).

Release-please investigation

Looking at release-please it autogenerates a PR that is the placeholder of the next release. The PR contains release notes, and the PR is continually updated as new commits get pushed, example. The PR is created via github workflow. the release note generation is a bit more clever than goreleaser, it uses convention commit to filter out whats a feature by commits prefixed with feat:, and bug fixes from fix:. When you merge the PR (which just updates the CHANGELOG file) it:

image stolen from https://danwakeem.medium.com/improve-your-github-releases-10x-with-this-one-simple-action-56e59e46dd85 image

Release-please does not doing anything related to building code. They recommend you have other tooling that gets triggered on Github releases being created be responsible for uploading artifacts to the release. Rip grep is an example of a CI using Release-please that has a github action to trigger on a release being created, and then manually uploads the binaries.

Questions

or:

aclevername commented 2 months ago

after chatting with @catmo-syntasso @kirederik we're going to try out the 2nd approach of using release-please combined with goreleaser for manual releases. Two reasons:

aclevername commented 2 months ago

draft PR open, next steps in development documented in the PR