Skip to content

Commit 37d5007

Browse files
authored
docs: add release setup notes (#18)
1 parent e1019c9 commit 37d5007

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,7 @@ mise run test
138138
```
139139

140140
The test task runs each `test/*_spec.lua` file in headless Neovim with plenary.
141+
142+
## Releases
143+
144+
See [docs/RELEASE.md](docs/RELEASE.md) for release-please setup and token permissions.

docs/RELEASE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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

Comments
 (0)