---
# System prepended metadata

title: Release Automation
tags: [kapp]

---

# Release Automation
###### tags: `kapp`

We have automated some parts of the release process. This document explains the various steps followed to automate the release process. For github Action, please look [here](https://github.com/vmware-tanzu/carvel-kapp/blob/develop/.github/workflows/release.yml).

![](https://i.imgur.com/IPN6KCE.png)


Release process has been automated with the help of github actions. Lets dive into it:

1. This github action will be triggered only when there is git push of a  <tag> and that tag starts with "v".
2. Once the tag is pushed, we download the ubuntu image, checkout the code and download golang.
3. After that, we use the [goreleaser](https://goreleaser.com/intro/) to create a draft release.GoReleaser is a release automation tool for Go projects with the goal to simplify the build, release steps.
4. We get the checksum of the binaries from the draft release and compare it with checksum from "hack/build-binaries.sh" file to verify the uploaded artifacts.


## GoReleaser Configuration:

As mentioned earlier, GoReleaser is a release automation tool for Go projects with the goal to simplify the build, release steps. 

Below diagram depicts the various steps performed by Goreleaser to create a release:

![](https://i.imgur.com/BC9mCoU.png)



GoReleaser tool is quite flexible and provide a lot of configuration to customize our release process. We will go through the various configurations we are using ([Config File](https://github.com/vmware-tanzu/carvel-kapp/blob/develop/.goreleaser.yml)) and what do they mean:

1. goos: GOOS list to build for.
2. goarch: GOARCH to build for.
3. main: Path to main.go file or main package.
4. binary: Name of the binary file.
5. format: Archive format. In Binary format, no archives are created and the binaries are instead uploaded directly.
6. replacements: Replacements for GOOS and GOARCH in the archive name.
7. checksum: By default, GoReleaser generates a `project_1.0.0_checksums.txt` file and uploads it with the release, so your users can validate if the downloaded files are correct.
8.  algorithm: Algorithm to be used to create the checksum for binary file.
11. disable: Disable the generation/upload of the checksum file.
12. draft: If set to true, will not auto-publish the release.

## Manual Steps:

This will create the draft release. We still have to update the changelog and perform other steps manually. Steps from point [13](https://hackmd.io/gsPXbIjjQe6lJb3eKmvqVQ) are still manual.






