google / addlicense

A program which ensures source code files have copyright license headers by scanning directory patterns recursively
Apache License 2.0
724 stars 170 forks source link

build and publish release artifacts for git tags #83

Closed willnorris closed 3 years ago

willnorris commented 3 years ago

This adds a GitHub actions workflow to build and publish cross-platform go binaries as well as a docker image when git tags are pushed. This is important because I don't expect our engineers that will be using addlicense to necessarily have go on their workstation.

This uses https://github.com/goreleaser/goreleaser to build linux, macos, and windows binaries of addlicense and include them as assets on the release. You can see an example here: https://github.com/willnorris/addlicense/releases/tag/v0.1.

This also builds and publishes a docker image to the GitHub Container registry on new tags. It would be relatively trivial to also publish to DockerHub, Google Container Registry, etc.

cc @mco-gh for review

crazy-max commented 3 years ago

@willnorris

You can see an example here: https://github.com/willnorris/addlicense/releases/tag/v0.1.

Please keep it semver compliant if you do so thanks :)

willnorris commented 3 years ago

Please keep it semver compliant if you do so thanks :)

yep, absolutely! I was just working on opening a new issue to discuss versions and tagging releases :)