Skip to content

Commit e6b16a1

Browse files
theoephraimCI
andauthored
docs: trim CI section in README, link to actions guide (#102)
## Summary - The CI / GitHub Actions section in the README had grown to ~130 lines of YAML that duplicated `docs/github-actions.md` and was drifting out of sync (e.g. README showed the old single-job release workflow while the docs had moved to the split-job `ci plan` + `--expect-mode` pattern). - Replace it with a short summary of the three `bumpy ci` subcommands (`check`, `plan`, `release`) and a pointer to the actions guide for ready-to-copy workflows, token setup, and trusted publishing. - Promote "Local versioning and publishing" to its own h2 since it's no longer nested under the CI section. - Drive-by polish: split the old "Pack-then-publish" feature bullet into separate "OIDC + staged publishing" and "Custom release targets" lines, add a "No additional action/app needed" feature bullet, and surface `bumpy ci setup` in Getting Started. Net change: 159 lines → 20 lines in README.md. ## Test plan - [ ] Read through the rendered README on the PR and confirm the CI section reads cleanly - [ ] Confirm the [GitHub Actions setup guide](docs/github-actions.md) link resolves - [ ] Spot-check that no other docs/links still reference the removed README anchors Co-authored-by: CI <ci@example.com>
1 parent a2cf1d6 commit e6b16a1

1 file changed

Lines changed: 20 additions & 139 deletions

File tree

README.md

Lines changed: 20 additions & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,21 @@
1515

1616
# @varlock/bumpy 🐸
1717

18-
A modern package versioning, release, and changelog generation tool. Built for monorepos, but works great in simpler projects too.
18+
A modern package versioning, release, and changelog generation tool. Built for monorepos, but works great in simple projects too.
1919

2020
## How It Works
2121

22-
Bumpy uses **bump files** (you may know them as "changesets" if coming from [that tool 🦋](https://github.com/changesets/changesets)) - small markdown files that declare an intent to release packages with a bump level (patch/minor/major), and a description that ends up in changelogs. Developers create these files as part of their PRs, and these files are then used to consolidate changes, generate changelogs, and trigger publishing. Specifically:
22+
Bumpy uses **bump files** (you may know them as "changesets" if coming from [that tool 🦋](https://github.com/changesets/changesets)) - small markdown files that declare an _intent to release packages_ with a bump level (patch/minor/major), and a description that ends up in changelogs. Developers create these files as part of their PRs, and these files are then used to consolidate changes, generate changelogs, and trigger publishing.
2323

2424
- Devs/agents create bump files as part of their PRs (using `bumpy add` or manually)
2525
- A git hook (pre-commit or pre-push) can enforce bump files exist for changed packages
2626
- In CI, a workflow checks PRs for bump files, leaves a comment on the PR detailing changed packages
2727
- As PRs merge to the base branch, a "release PR" is kept up to date
28-
- Shows what packages will be released and their changelogs
29-
- Including packages bumped automatically due to dependency relationships
28+
- Shows what packages will be released and their changelogs (incl. those bumped via dep relationships)
3029
- When release PR is merged, publishing is triggered
31-
- Pending bump files are deleted and packages are published with updated versions and changelogs
30+
- Pending bump files are deleted and packages are published with updated versions and changelogs, github tags+releases created
3231

33-
All of this is automated via two simple GitHub Actions workflows (see [CI setup](#ci--github-actions) below). You can also run everything locally with `bumpy status`, `bumpy version`, and `bumpy publish`.
32+
All of this is automated via two simple GitHub Actions workflows (see [actions guide](https://github.com/dmno-dev/bumpy/blob/main/docs/github-actions.md)). Or can be triggered locally.
3433

3534
### Example bump file
3635

@@ -42,21 +41,23 @@ All of this is automated via two simple GitHub Actions workflows (see [CI setup]
4241
'@myorg/utils': patch
4342
---
4443

45-
Added user language preference to the core config.
44+
Added user lang prefs to core config.
4645
Fixed locale fallback logic in utils.
4746
```
4847

4948
## Features
5049

51-
- **All package managers** - npm, pnpm, yarn, and bun workspaces
50+
- **All package managers** - npm, pnpm, yarn, and bun workspaces. With full `workspace:` and `catalog:` support
5251
- **Smart dependency propagation** - configurable rules for how version bumps cascade through your dependency graph (see [version propagation docs](https://github.com/dmno-dev/bumpy/blob/main/docs/version-propagation.md))
53-
- **Pack-then-publish** - by default, publishes to npm (resolving `workspace:` and `catalog:` protocols, with OIDC/provenance support). Supports [npm staged publishing](https://docs.npmjs.com/staged-publishing) for 2FA-gated releases. Per-package custom publish commands let you target anything - VSCode extensions, Docker images, JSR, private registries, etc.
52+
- **OIDC + staged publishing** - supports OIDC, provenance, [npm staged publishing](https://docs.npmjs.com/staged-publishing)
53+
- **Custom release targets** - Per-package custom publish commands let you target anything - VSCode extensions, Docker images, JSR, private registries, etc.
5454
- **Flexible package management** - include/exclude any package individually via per-package config, glob patterns, or `privatePackages` setting
5555
- **Non-interactive CLI** - `bumpy add` works fully non-interactively for CI/CD and AI-assisted development
5656
- **Aggregated GitHub releases** - optionally create a single consolidated release instead of one per package
5757
- **Auto-generate from commits** - `bumpy generate` creates bump files from branch commits - works with any commit style, with enhanced detection for conventional commits
5858
- **Pluggable changelog formatters** - built-in `"default"` and `"github"` formatters, or write your own
5959
- **Zero runtime dependencies** - dependencies are minimal and bundled at release time
60+
- **No additional action/app needed** - no external github action or app to audit and trust
6061

6162
## Getting Started
6263

@@ -67,6 +68,9 @@ bun add -d @varlock/bumpy # or npm/pnpm/yarn
6768
# Initialize (creates .bumpy/ directory and config, migrates from changesets if applicable)
6869
bunx bumpy init
6970

71+
# Interactive guidance setting up CI
72+
bunx bumpy ci setup
73+
7074
# Create a bump file
7175
bunx bumpy add
7276

@@ -78,138 +82,15 @@ Then set up CI to automate versioning and publishing (see below).
7882

7983
## CI / GitHub Actions
8084

81-
No GitHub App to install, no separate action to rely on - just call `bumpy ci` directly in your workflows. Two commands handle the entire release lifecycle:
82-
83-
- **`bumpy ci check`** - runs on every PR. Computes the release plan from pending bump files and posts/updates a comment on the PR showing what versions would be released. Warns if any changed packages are missing bump files.
84-
- **`bumpy ci release`** - runs on push to main. If pending bump files exist, it opens (or updates) a "Version Packages" PR that applies all version bumps and changelog updates. If the current push _is_ the Version Packages PR being merged, it publishes the new versions, creates git tags, and creates GitHub releases.
85-
86-
_examples use bun, but works with Node.js_
87-
88-
### PR check workflow
89-
90-
```yaml
91-
# .github/workflows/bumpy-check.yaml
92-
#
93-
# ⚠️ Uses `pull_request_target` so fork PR comments work — runs with write
94-
# perms and secrets, so it MUST NOT execute PR code (no `bun install`, no
95-
# PR-defined scripts). Bumpy only reads files; its version is resolved from
96-
# the base branch's package.json. See docs/github-actions.md for details.
97-
name: Bumpy Check
98-
on: pull_request_target
99-
100-
permissions:
101-
pull-requests: write
102-
contents: read
103-
104-
jobs:
105-
check:
106-
runs-on: ubuntu-latest
107-
steps:
108-
- uses: actions/checkout@v6
109-
with:
110-
ref: ${{ github.event.pull_request.head.sha }}
111-
- uses: oven-sh/setup-bun@v2
112-
113-
# Resolve bumpy's version from the base branch (trusted) — not the PR's
114-
# package.json (which a fork PR could swap to a malicious version).
115-
# Change "main" to your base branch if different.
116-
- name: Resolve bumpy version from base
117-
run: |
118-
git fetch origin main --depth=1
119-
VERSION=$(git show "origin/main:package.json" \
120-
| jq -r '.devDependencies["@varlock/bumpy"] // .dependencies["@varlock/bumpy"]' \
121-
| sed 's/[\^~]//')
122-
echo "BUMPY_VERSION=$VERSION" >> "$GITHUB_ENV"
123-
124-
- run: bunx "@varlock/bumpy@$BUMPY_VERSION" ci check
125-
env:
126-
GH_TOKEN: ${{ github.token }}
127-
```
128-
129-
### Release workflow
130-
131-
```yaml
132-
# .github/workflows/bumpy-release.yml - trusted publishing (OIDC, no secret needed)
133-
name: Bumpy Release
134-
on:
135-
push:
136-
branches: [main]
137-
138-
jobs:
139-
release:
140-
runs-on: ubuntu-latest
141-
permissions:
142-
contents: write
143-
pull-requests: write
144-
id-token: write # required for npm trusted publishing (OIDC) and provenance
145-
steps:
146-
- uses: actions/checkout@v6
147-
with:
148-
fetch-depth: 0
149-
- uses: oven-sh/setup-bun@v2
150-
- uses: actions/setup-node@v6
151-
with:
152-
node-version: latest
153-
- run: npm install -g npm@latest # ensure npm >= 11.15.0 for OIDC/staged publishing
154-
- run: bun install
155-
- run: bunx @varlock/bumpy ci release
156-
env:
157-
GH_TOKEN: ${{ github.token }}
158-
BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }} # PAT so that version PR triggers CI
159-
```
160-
161-
> **Trusted publishing setup:** Configure each package on [npmjs.com](https://docs.npmjs.com/trusted-publishers/) → Package Settings → Trusted Publishers → GitHub Actions. Specify your org/user, repo, and the workflow filename (`bumpy-release.yml`). No `NPM_TOKEN` secret needed. Enable `provenance` and `npmStaged` in your [publish config](https://github.com/dmno-dev/bumpy/blob/main/docs/configuration.md#staged-publishing) for maximum security.
162-
163-
<details>
164-
<summary>Alternative: token-based auth (NPM_TOKEN secret)</summary>
165-
166-
```yaml
167-
# .github/workflows/bumpy-release.yml - token-based auth
168-
name: Bumpy Release
169-
on:
170-
push:
171-
branches: [main]
172-
173-
jobs:
174-
release:
175-
runs-on: ubuntu-latest
176-
permissions:
177-
contents: write
178-
pull-requests: write
179-
steps:
180-
- uses: actions/checkout@v6
181-
with:
182-
fetch-depth: 0
183-
- uses: oven-sh/setup-bun@v2
184-
- run: bun install
185-
- run: bunx @varlock/bumpy ci release
186-
env:
187-
GH_TOKEN: ${{ github.token }}
188-
BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
189-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
190-
```
191-
192-
</details>
193-
194-
### Token setup
195-
196-
The default `github.token` works for basic functionality, but GitHub's anti-recursion guard means PRs created by the default token won't trigger other workflows - so your regular CI (tests, linting, etc.) won't run automatically on the Version Packages PR. To fix this, provide a `BUMPY_GH_TOKEN` secret using either a **fine-grained PAT** or a **GitHub App token**. See the [full token setup guide](https://github.com/dmno-dev/bumpy/blob/main/docs/github-actions.md#token-setup) for details.
85+
No GitHub App to install, no separate action to rely on — just call `bumpy ci` directly in your workflows. Three commands across two workflows handle the entire release lifecycle:
19786

198-
Run `bumpy ci setup` for interactive guidance, or set it up manually:
87+
- **`bumpy ci check`** — on every PR, posts/updates a comment showing the release plan and warns if changed packages are missing bump files.
88+
- **`bumpy ci plan`** — on push to main, detects what should happen next (`version-pr`, `publish`, or nothing) without needing write permissions or publish credentials. Used to gate downstream jobs in split-job workflows.
89+
- **`bumpy ci release`** — opens/updates the "Version Packages" PR, or publishes new versions and creates git tags + GitHub releases when that PR is merged.
19990

200-
1. Create a [fine-grained personal access token](https://github.com/settings/personal-access-tokens) with:
201-
- **Repository access:** your repo only
202-
- **Permissions:** Contents (read & write), Pull requests (read & write)
203-
2. Add it as a repository secret named `BUMPY_GH_TOKEN`
204-
3. Add it to your release workflow:
205-
```yaml
206-
- run: bunx @varlock/bumpy ci release
207-
env:
208-
GH_TOKEN: ${{ github.token }}
209-
BUMPY_GH_TOKEN: ${{ secrets.BUMPY_GH_TOKEN }}
210-
```
91+
Run `bumpy ci setup` for interactive guidance, and see the [GitHub Actions setup guide](https://github.com/dmno-dev/bumpy/blob/main/docs/github-actions.md) for ready-to-copy workflows, token setup, and trusted publishing.
21192

212-
### Local versioning and publishing
93+
## Local versioning and publishing
21394

21495
If you prefer to version and publish locally instead of via CI:
21596

@@ -270,7 +151,7 @@ bunx bumpy --help # invoke built cli
270151
- Better support for versioning non-JS packages and usage without package.json files
271152
- Plugin system for different publish targets, and support multiple targets per package
272153
- Tracking workspace-level / non-publishable changes
273-
- More frogs 🐸
154+
- More frogs 🐸🐸🐸
274155

275156
---
276157

0 commit comments

Comments
 (0)