chai icon indicating copy to clipboard operation
chai copied to clipboard

Automatically add go binaries to the release

Open asdine opened this issue 3 years ago • 6 comments

Whenever we release a new version of the CLI, we should automatically compile the binary for Linux, macos and windows, 32 and 64 bits and upload them to the Github release.

asdine avatar Oct 17 '20 12:10 asdine

I have a WIP PoC on release branch using GitHub Actions.

First a workflow is triggered either on manual dispatch, or on tag push. It runs gorelease tool to check whether the new version is a valid semver release (i.e. there are no breaking changes). It then creates a draft release with the changelog from gorelease.

When the draft is published, it creates a new tag (if it does not exist) and another workflow is triggered that builds and uploads. release assets.

Also, I haven't tested that on 32-bit x86, but it looks like BadgerDB fails to compile on 32-bit ARM.

tie avatar Oct 17 '20 12:10 tie

@tie that workflow seems great, can't wait to see it in action! Regarding compiling targets, it would be great to have arm 64 bits and wasm as well

asdine avatar Oct 17 '20 12:10 asdine

Building native targets like arm64 is a matter of adding them to the build matrix. I’m not sure how to handle the wasm builds though. Should we use gc or tinygo? How can I test locally that a wasm build works?

tie avatar Oct 17 '20 12:10 tie

Come to think of it, let's not deal with wasm for now. I still have trouble testing it correctly, but once https://github.com/genjidb/genji.js will be more mature we'll probably find a way to do that properly.

asdine avatar Oct 17 '20 13:10 asdine

@tie are you still interested in this one?

asdine avatar Apr 01 '21 19:04 asdine

Sure, I’ll look into it this weekend! I think I had a (mostly) working workflow back then, though I’m sure I’d want to make some simplifications now.

tie avatar Apr 02 '21 17:04 tie