Skip to content

Commit de045c4

Browse files
dblockclaude
andcommitted
Document ignoring Bundler output
ruby/setup-ruby's bundler-cache installs gems into vendor/bundle inside the checkout, and the capture step, which also runs in dry runs, fails on untracked files. Tell users to ignore vendor/bundle and any lockfile they don't commit. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Gr21htyJfr8XZGHBcPwkW
1 parent 89adf5f commit de045c4

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [#92](https://github.com/dblock/ruby-gem-release/pull/92): Document manual recovery from the preserved bundle when the default branch advances during publication - [@dblock](https://github.com/dblock).
88
- [#93](https://github.com/dblock/ruby-gem-release/pull/93): Document disabling the local Bundler `release` tasks so the workflow is the only release path - [@dblock](https://github.com/dblock).
99
- [#95](https://github.com/dblock/ruby-gem-release/pull/95): Rewrite the documentation in plain language, consolidating repeated rules so each lives in one place - [@dblock](https://github.com/dblock).
10+
- [#97](https://github.com/dblock/ruby-gem-release/pull/97): Document ignoring `vendor/bundle` and an untracked lockfile, which otherwise fail the clean-checkout check in every release and dry run - [@dblock](https://github.com/dblock).
1011
- Your contribution here.
1112

1213
## 0.9.0 (2026/11/20)

‎README.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ With these defaults, a release:
4545

4646
If your Rakefile also installs the Bundler gem tasks, disable the local Bundler `release` tasks so nobody can publish around the workflow. See [Bundler Release Tasks](docs/usage.md#bundler-release-tasks).
4747

48+
Ignore Bundler output in your `.gitignore`. The workflow installs gems with `ruby/setup-ruby`'s `bundler-cache` into `vendor/bundle` inside your checkout, and every release and dry run stops if the checkout has untracked files. Ignore `Gemfile.lock` too unless you commit it, and the lockfile of a [release Gemfile](docs/actions/release.md#release-gemfile):
49+
50+
```gitignore
51+
/vendor/bundle/
52+
/Gemfile.lock
53+
```
54+
4855
### 2. Add the Release Workflow
4956

5057
Copy the [sample workflow](examples/.github/workflows/release.yml) to `.github/workflows/release.yml` and set your Ruby version:

‎docs/actions/release.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The workflow sets `GH_TOKEN` during publication. Branch rules must allow fast-fo
124124

125125
The job runs on `ubuntu-latest` in the `release` environment with a full checkout. Releases share one concurrency group per repository, so a new release waits rather than canceling a running one.
126126

127-
1. **Capture:** after Ruby setup, the checkout must be clean. Changed, staged, or untracked files fail with their paths. Ignored Bundler output is fine; tracked dependency files are not.
127+
1. **Capture:** after Ruby setup, the checkout must be clean, in a dry run too. Changed, staged, or untracked files fail with their paths. Ignored Bundler output is fine; tracked dependency files are not. Ruby setup installs gems into `vendor/bundle` and may write a lockfile, so [ignore them](../../README.md#1-configure-your-gem) unless you commit the lockfile.
128128
2. **Validate, prepare, test:** files changed by `prepare` are staged before tests. Publication rejects any later change instead of committing it. Custom bump callbacks wrap edits in `git.stage_changes!`, as in [Detailed Usage](../usage.md#custom-callbacks).
129129
3. **Checkpoint:** the workflow commits, builds, and tags locally, then uploads [recovery artifacts](#recovery-artifacts). This must succeed before `publish` and `bump`.
130130
4. **Publish, bump, notify:** any failure stops later steps.

0 commit comments

Comments
 (0)