boson-project / buildpacks

Boson Project function buildpacks
Apache License 2.0
5 stars 11 forks source link

feat(ci/cd): add automated releases with release-please #24

Closed lance closed 4 years ago

lance commented 4 years ago

This commit changes the releases.yaml GitHub action to be appropriate to run on every push to master. For each push, a full build is run. Then a check is made to see if a PR for the next release exists. If it does not exist, one will be created with the contents of the latest commit. If the PR already exists, it will be updated to include the the latest commit.

When the generated PR is finally merged into the master branch, this action runs again, this time noting that it's the release PR that has been merged. It creates a v*.*.* version tag for the new version, and creates a GitHub Release. Only when a version is created, the images are pushed to quay.io.

The release PR to update the CHANGELOG.md file with the release commits, and the version.txt file with the version number looks like this.

image

When the PR lands, the source is tagged on master with the version. In this example, v0.5.0.

image

With a corresponding GitHub Release.

image

And a branch.

image

Fixes: https://github.com/boson-project/buildpacks/issues/10