|
| 1 | +# Release |
| 2 | + |
| 3 | +Releases are managed by [release-please](https://github.com/googleapis/release-please) through |
| 4 | +`.github/workflows/release.yml`. |
| 5 | + |
| 6 | +The workflow runs on pushes to `main`. It expects a repository secret named |
| 7 | +`RELEASE_PLEASE_GITHUB_TOKEN`. |
| 8 | + |
| 9 | +## Token |
| 10 | + |
| 11 | +Use a fine-grained GitHub personal access token scoped only to `bullets-vim/bullets.nvim` with a 90-day |
| 12 | +expiration. |
| 13 | + |
| 14 | +GitHub's fine-grained token URL parameters can prefill the resource owner, expiration, and permissions, but |
| 15 | +GitHub does not document a URL parameter for selecting one specific repository. After opening this URL, choose |
| 16 | +**Only select repositories** and select `bullets-vim/bullets.nvim` before generating the token: |
| 17 | + |
| 18 | +https://github.com/settings/personal-access-tokens/new?name=bullets.nvim%20release-please&description=release-please%20for%20bullets-vim%2Fbullets.nvim&target_name=bullets-vim&expires_in=90&contents=write&pull_requests=write&issues=write |
| 19 | + |
| 20 | +Required repository permissions: |
| 21 | + |
| 22 | +| Permission | Access | |
| 23 | +| ------------- | -------------- | |
| 24 | +| Contents | Read and write | |
| 25 | +| Pull requests | Read and write | |
| 26 | +| Issues | Read and write | |
| 27 | + |
| 28 | +`Metadata: Read-only` is added automatically. Do not grant broader permissions unless release-please starts |
| 29 | +updating workflow files, in which case the token also needs `Workflows: Read and write`. |
| 30 | + |
| 31 | +The `Issues` permission is for labeling release PRs; GitHub manages PR labels through the Issues API. |
| 32 | + |
| 33 | +Store the generated token as the repository secret: |
| 34 | + |
| 35 | +```sh |
| 36 | +gh secret set RELEASE_PLEASE_GITHUB_TOKEN --repo bullets-vim/bullets.nvim |
| 37 | +``` |
| 38 | + |
| 39 | +Paste the token when prompted. |
| 40 | + |
| 41 | +## Release Flow |
| 42 | + |
| 43 | +1. Merge conventional commits to `main`. |
| 44 | +2. The release workflow opens or updates a release PR. |
| 45 | +3. Merge the release PR when ready. |
| 46 | +4. release-please creates the GitHub release and tag. |
0 commit comments