You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 009e119
Browse filesBrowse the repository at this point in the historyBrowse files
Document recovery when the default branch advances mid-release
A merge after the tag check and before the release push leaves the gem
published while the push fails, and reruns cannot recover. Document the
manual recovery from the preserved artifacts in the workflow reference:
verify the published digest, push the tag from the bundle, merge the
release commit through a pull request, create the GitHub Release, and
start the next iteration. Warn against merging while a release runs, and
point to it from RELEASING.md, README, and the composite action docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Gr21hZDQo5axDMuFgzL6s
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
5
5
-[#90](https://github.com/dblock/ruby-gem-release/pull/90): Publish the released changelog section as GitHub Release notes in the standard workflow instead of generated notes, read before any publication - [@dblock](https://github.com/dblock).
6
6
-[#91](https://github.com/dblock/ruby-gem-release/pull/91): Accept an Intridea Next section with release notes but no contribution placeholder, rejecting a placeholder marked differently from the configured one - [@dblock](https://github.com/dblock).
7
+
-[#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).
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Collaborators with write access can dispatch releases after this setup, without
76
76
77
77
### 4. Make a Release
78
78
79
-
Your branch rules must permit release commits and tags to be pushed; see [branch permissions](RELEASING.md#one-time-setup). Each release checks this before publishing. Dispatching starts a publishing run; when required reviewers are configured, the release job waits for approval from a designated maintainer. Run your project's tests and build checks, review the changes, and dispatch from your default branch:
79
+
Your branch rules must permit release commits and tags to be pushed; see [branch permissions](RELEASING.md#one-time-setup). Each release checks this before publishing. Dispatching starts a publishing run; when required reviewers are configured, the release job waits for approval from a designated maintainer. Run your project's tests and build checks, review the changes, and dispatch from your default branch: Do not merge into the default branch while a release runs; see [recovery](docs/actions/release.md#default-branch-advanced-during-publication).
80
80
81
81
**First release:** Pass the numeric RubyGems account ID shown on the Pending Trusted Publishers page as `rubygems-owner`. This declares the account that will own the gem on its first publication. Replace `YOUR_ACCOUNT_ID` below with that ID:
Copy file name to clipboardExpand all lines: RELEASING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ Builds overwrite local artifacts reproducibly. Capture exports the committer tim
74
74
75
75
Git reuses matching release and development trees without moving tags or rewinding remote descendants. Development bumps calculate from the supplied release version, so repetition does not increment twice. GitHub replaces differing release metadata, notes read from the changelog, and assets; unspecified platform-generated notes are retained.
76
76
77
-
Actions preserves `release.gem`, its name/version/digest manifest `release.json`, and `release.bundle` before publication for 30 days. These are for manual inspection, not automatic restoration. Conflicting checksums or tags and unrelated branch advancement require investigation; do not overwrite immutable releases.
77
+
Actions preserves `release.gem`, its name/version/digest manifest `release.json`, and `release.bundle` before publication for 30 days. These are for manual inspection, not automatic restoration. Conflicting checksums or tags and unrelated branch advancement require investigation; do not overwrite immutable releases. If the default branch advanced during publication, follow [the manual recovery](docs/actions/release.md#default-branch-advanced-during-publication).
78
78
79
79
All custom commands and callbacks must be idempotent too. Notifications need receiver-side readback or a stable key such as `"release/example/1.2.3/success"`, never a run ID. They may execute again; without receiver support, exactly-once delivery and automatic detection of an unfinished notification are impossible. Release reconciliation proves package, Git, hosting, and development completion, not arbitrary external callback completion.
Copy file name to clipboardExpand all lines: docs/actions/action.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,4 +76,4 @@ For first publication, register a pending trusted publisher and supply its numer
76
76
77
77
With the sample, dispatch a first release using `gh workflow run release.yml -f rubygems-owner=YOUR_ACCOUNT_ID`, replacing `YOUR_ACCOUNT_ID` with your numeric account ID. For subsequent releases, omit `rubygems-owner`. Validate locally before authorizing publication.
78
78
79
-
Artifacts must be preserved before publication. Reruns use the supplied checkout and inputs, not restored context or automatically discovered unfinished releases. See [Verify and Recover](../../RELEASING.md#verify-and-recover).
79
+
Do not merge into the default branch while a release runs; see [recovery](release.md#default-branch-advanced-during-publication). Artifacts must be preserved before publication. Reruns use the supplied checkout and inputs, not restored context or automatically discovered unfinished releases. See [Verify and Recover](../../RELEASING.md#verify-and-recover).
Copy file name to clipboardExpand all lines: docs/actions/release.md
+41-1Lines changed: 41 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,6 +164,46 @@ GitHub also supplies standard variables such as `GITHUB_REPOSITORY` and `RUNNER_
164
164
165
165
## Recovery Artifacts
166
166
167
-
The workflow requires `release.gem`, its name/version/digest manifest `release.json`, and `release.bundle` to be uploaded before publication, retained for 30 days under `release-gem-VERSION-RUN_ID-RUN_ATTEMPT`. These support manual inspection, not automatic restoration. See [RELEASING.md](../../RELEASING.md#verify-and-recover).
167
+
The workflow requires `release.gem`, its name/version/digest manifest `release.json`, and `release.bundle` to be uploaded before publication, retained for 30 days under `release-gem-VERSION-RUN_ID-RUN_ATTEMPT`. These support manual inspection, not automatic restoration. See [RELEASING.md](../../RELEASING.md#verify-and-recover) and [recovery when the default branch advances during publication](#default-branch-advanced-during-publication).
168
168
169
169
For already-reviewed commits, stable branches, existing signed tags, and explicitly supplied package collections, use the [reviewed workflow](../workflow/reviewed_ruby_gem.md). It retains publication guards but makes no release preparation commits, new tags, Git pushes, or development bumps. `prepare-artifacts` and `artifacts` support explicit retained inputs without artifact discovery; both interfaces expose the same inputs.
170
+
171
+
### Default Branch Advanced During Publication
172
+
173
+
Do not merge into the default branch while a release runs. The tag step fails before publication if the branch has moved since capture, but a merge after that check and before the release push leaves the gem published on RubyGems while the push fails with `Default branch advanced; start a new release`. The release tag, the release commit on the default branch, the GitHub Release, and the next development iteration are then missing. Rerunning does not recover: each run creates a new release commit, and tagging requires the branch to still be at the source commit. Recover manually from the preserved artifacts instead, replacing `1.2.3`, `example`, `RUN_ID`, and `ATTEMPT`:
174
+
175
+
**Step 1.** Download the failed run's artifacts and confirm RubyGems published the preserved archive:
176
+
177
+
```sh
178
+
gh run download RUN_ID -n release-gem-1.2.3-RUN_ID-ATTEMPT -D release-artifacts
The digests must match. If they differ, or the version is missing, stop and investigate instead.
184
+
185
+
**Step 2.** Import the release commit and tag from the bundle, and push the tag. It points at the release commit, whose parent is the dispatched source commit:
**Step 3.** Merge the release commit into the default branch through a pull request, resolving conflicts with the changes merged during the release. Do not rewrite or move the tag.
**Step 4.** Create the GitHub Release with the preserved archive under its gem file name, as normal releases attach it. Write the released changelog section to `NOTES.md`, or replace `--notes-file NOTES.md` with `--generate-notes`:
**Step 5.** Start the next development iteration in a pull request that increments the version and adds the Next changelog section, as the bump would have.
208
+
209
+
Do not dispatch a new release of the same version. RubyGems accepts only the identical archive, and a rebuilt release commit would not match the pushed tag.
0 commit comments