Skip to content

Commit ed17b91

Browse files
authored
fix: fall back to github token for release please (#19)
1 parent 37d5007 commit ed17b91

3 files changed

Lines changed: 59 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- name: Release Please
1717
uses: googleapis/release-please-action@v5.0.0
1818
with:
19-
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN }}
19+
token: ${{ secrets.RELEASE_PLEASE_GITHUB_TOKEN || github.token }}
2020
config-file: release-please-config.json
2121
manifest-file: .release-please-manifest.json

docs/DEVELOPMENT.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Development
2+
3+
## Stacked PRs
4+
5+
Use the local `stack` CLI for stacked PR maintenance in this repository. It is built for squash-merge
6+
repositories where merged branches are deleted, so Git ancestry alone cannot preserve stack intent.
7+
8+
Use plain `git` for normal editing and commits. Use `stack` for stack inspection, PR-base syncing, safe
9+
merges, and undo workflows.
10+
11+
Common commands:
12+
13+
```sh
14+
stack status
15+
stack guide
16+
stack sync --dry-run
17+
stack sync
18+
stack sync --keep-going
19+
stack merge
20+
stack merge --apply
21+
stack merge --auto
22+
stack history
23+
stack undo
24+
stack undo --apply
25+
```
26+
27+
Preferred stacked PR flow:
28+
29+
```sh
30+
gh pr create --base main --head stack-a
31+
gh pr create --base stack-a --head stack-b
32+
stack sync --dry-run
33+
stack sync
34+
```
35+
36+
Use `stack sync --dry-run` before mutating stack metadata or retargeting PRs. If the preview is correct,
37+
run `stack sync` to infer PR-base stack links, repair descendants, retarget PRs, and refresh stack blocks in
38+
PR descriptions.
39+
40+
Use `stack merge` without flags as a dry run. Add `--apply` only after the plan looks correct. Use
41+
`stack merge --auto` when GitHub auto-merge should land the root PR and then repair descendants.
42+
43+
If a stack operation needs to be reverted, inspect the latest repair journal first:
44+
45+
```sh
46+
stack history
47+
stack undo
48+
stack undo --apply
49+
```
50+
51+
Do not edit `.git/stack/state.json` by hand. If local stack metadata looks stale, run `stack sync --dry-run`
52+
and then `stack sync` if the inferred stack is correct.

docs/RELEASE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Releases are managed by [release-please](https://github.com/googleapis/release-please) through
44
`.github/workflows/release.yml`.
55

6-
The workflow runs on pushes to `main`. It expects a repository secret named
7-
`RELEASE_PLEASE_GITHUB_TOKEN`.
6+
The workflow runs on pushes to `main`. It uses the `RELEASE_PLEASE_GITHUB_TOKEN` repository secret
7+
when configured and falls back to the workflow `GITHUB_TOKEN` otherwise.
88

99
## Token
1010

@@ -38,6 +38,10 @@ gh secret set RELEASE_PLEASE_GITHUB_TOKEN --repo bullets-vim/bullets.nvim
3838

3939
Paste the token when prompted.
4040

41+
Without this secret, release-please can still run with `GITHUB_TOKEN`, but release PRs and tags created by
42+
`GITHUB_TOKEN` will not trigger follow-up workflow runs. Use the fine-grained token when release-please PRs
43+
need normal CI checks.
44+
4145
## Release Flow
4246

4347
1. Merge conventional commits to `main`.

0 commit comments

Comments
 (0)