|
| 1 | +# Contributing |
| 2 | + |
| 3 | +## Release process |
| 4 | + |
| 5 | +Releases are driven by [changie](https://changie.dev) and [GoReleaser](https://goreleaser.com). The flow is: |
| 6 | + |
| 7 | +1. **Add a changelog fragment with every user-visible PR.** |
| 8 | + |
| 9 | +Run `changie new` from the repo root and answer the prompts: |
| 10 | +- **Component**: one of `language-host`, `converter`, `codegen`, `runtime`. |
| 11 | +- **Kind**: `Improvements` (auto-bumps minor) or `Bug Fixes` (auto-bumps patch). |
| 12 | +- **Body**: a short description written from the user's perspective. |
| 13 | +- **PR**: the GitHub PR number this change ships in. |
| 14 | + |
| 15 | +This writes a file under `.changes/unreleased/`. Commit it with your PR. |
| 16 | + |
| 17 | +2. **Cut a release PR.** |
| 18 | + |
| 19 | +When you're ready to ship, run: |
| 20 | + |
| 21 | +```sh |
| 22 | +changie batch auto # or an explicit version, e.g. `changie batch v0.2.0` |
| 23 | +changie merge |
| 24 | +``` |
| 25 | + |
| 26 | +`changie batch` consumes everything in `.changes/unreleased/` and writes |
| 27 | +`.changes/<version>.md`. `changie merge` rewrites the top-level `CHANGELOG.md` from the |
| 28 | +header template plus all batched versions. Open a PR titled "Release `<version>`" with |
| 29 | +just those two changes. |
| 30 | + |
| 31 | +3. **Merge the release PR to `master`.** |
| 32 | + |
| 33 | +The `Release` workflow fires on any push to `master` that touches `CHANGELOG.md`. It: |
| 34 | +- reads the latest version with `changie latest`, |
| 35 | +- creates and pushes a `v<version>` git tag, |
| 36 | +- runs GoReleaser, which builds `pulumi-language-hcl` and `pulumi-converter-hcl` for |
| 37 | + linux/darwin/windows × amd64/arm64 and publishes them to a GitHub release whose body is |
| 38 | + `.changes/<version>.md`. |
| 39 | + |
| 40 | +The workflow no-ops if the tag already exists, so re-running it is safe. |
| 41 | + |
| 42 | +### Versioning |
| 43 | + |
| 44 | +The `auto` argument to `changie batch` picks the next version from the fragments: any |
| 45 | +`Improvements` entry bumps minor, otherwise `Bug Fixes` bumps patch. Override by passing |
| 46 | +an explicit `vX.Y.Z` when a release needs a major bump or a different version than `auto` |
| 47 | +would compute. |
0 commit comments