|
2 | 2 |
|
3 | 3 | Release tooling for KubeBuilder projects.
|
4 | 4 |
|
| 5 | +## Release Notes Generation |
| 6 | + |
| 7 | +The [notes](/notes) module contains a framework for generating release |
| 8 | +notes from git history using emoji, and the "root" of the module is |
| 9 | +a program that makes use of this: |
| 10 | + |
| 11 | +```shell |
| 12 | +# generate a final release |
| 13 | +$ go run sigs.k8s.io/kubebuilder-release-tools/notes |
| 14 | + |
| 15 | + generate a beta release |
| 16 | +$ go run sigs.k8s.io/kubebuilder-release-tools/notes -r beta |
| 17 | +``` |
| 18 | + |
| 19 | +## PR Verification GitHub Action |
| 20 | + |
| 21 | +This repository acts as a GitHub action for verifying PR titles match the |
| 22 | +[release notes generation requirements](/VERSIONING.md), as well as some |
| 23 | +basic descriptiveness checks. You can use it in your repository by adding |
| 24 | +a workflow (e.g. `.github/workflows/verifier.yml`) as such: |
| 25 | + |
| 26 | +```yaml |
| 27 | +name: PR Verifier |
| 28 | + |
| 29 | +on: |
| 30 | + # NB: using `pull_request_target` runs this in the context of |
| 31 | + # the base repository, so it has permission to upload to the checks API. |
| 32 | + # This means changes won't kick in to this file until merged onto the |
| 33 | + # main branch. |
| 34 | + pull_request_target: |
| 35 | + types: [opened, edited, reopened] |
| 36 | + |
| 37 | +jobs: |
| 38 | + verify: |
| 39 | + runs-on: ubuntu-latest |
| 40 | + name: verify PR contents |
| 41 | + steps: |
| 42 | + - name: Verifier action |
| 43 | + id: verifier |
| 44 | + uses: kubernetes-sigs/[email protected] |
| 45 | + with: |
| 46 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 47 | +``` |
| 48 | +
|
| 49 | +The code that actually runs lives in [verify/cmd](/verify/cmd), while |
| 50 | +[/verify](/verify) contains a framework for running PR description checks |
| 51 | +from GitHub actions & uploading the result via the GitHub checks API. |
| 52 | +
|
| 53 | +This repo itself uses a "live" version of the action that always rebuilds |
| 54 | +from the local code, which lives in [action-nightly](/action-nightly). |
| 55 | +
|
| 56 | +### Updating the action |
| 57 | +
|
| 58 | +If you release updates to the action, make sure to tag a new release, |
| 59 | +which triggers a build & tag of the docker container referenced by this |
| 60 | +action (using Google Cloud Build, pushed as |
| 61 | +[gcr.io/kubebuilder/pr-verifier](https://gcr.io/kubebuilder/pr-verifier)). |
| 62 | +and then update the corresponding major version tag (either `vX` or |
| 63 | +`v0.Y`) by running: |
| 64 | + |
| 65 | +```shell |
| 66 | +# where vX is the major version, vX.Y.Z is the release you just tagged, |
| 67 | +# and upstream is the remote for this repo itself, NOT your fork. |
| 68 | +$ git pull --tags upstream |
| 69 | +$ git tag -f vX vX.Y.Z |
| 70 | +$ git push upstream refs/tags/vX |
| 71 | +``` |
| 72 | + |
| 73 | +## KubeBuilder Project Versioning |
| 74 | + |
| 75 | +[VERSIONING.md](/VERSIONING.md) contains the general guidelines for |
| 76 | +versioning, releasing, etc for the KubeBuilder projects. |
| 77 | + |
| 78 | +The TL;DR on PR titles is that you must have a *prefix* on your PR title |
| 79 | +specifying the kind of change: |
| 80 | + |
| 81 | +- Breaking change: :warning: (`:warning:`) |
| 82 | +- Non-breaking feature: :sparkles: (`:sparkles:`) |
| 83 | +- Patch fix: :bug: (`:bug:`) |
| 84 | +- Docs: :book: (`:book:`) |
| 85 | +- Infra/Tests/Other: :seedling: (`:seedling:`) |
| 86 | + |
| 87 | +See [the document](/VERSIONING.md) for more details. |
| 88 | + |
5 | 89 | ## Community, discussion, contribution, and support
|
6 | 90 |
|
7 | 91 | Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).
|
|
0 commit comments