Skip to content

Commit cf0d033

Browse files
authored
Merge pull request #7 from gaelic-ghost/release/release-docs-v3-2-4
release: prepare v3.2.4
2 parents 75d7d53 + 8adc15e commit cf0d033

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Treat `main` as the release branch for this repository unless a future repo-local change says otherwise.
2222
- Use `scripts/repo-maintenance/release-prepare.sh` from feature branches and worktrees when the job is to validate a release candidate, push the branch, open or update the pull request, and queue auto-merge.
2323
- Use `scripts/repo-maintenance/release-publish.sh` only from local `main` after the release PR has merged when the job is to cut the annotated tag and GitHub release.
24+
- If local `main` is ahead of `origin/main`, do not try to publish from that unsynced checkout. Move that work onto a feature branch or keep it on the existing branch, run `release-prepare.sh`, merge the PR, fast-forward local `main`, and only then run `release-publish.sh`.
2425
- Do not publish release tags or GitHub releases directly from a feature branch or feature worktree in this repository.
2526
- Treat the resolved `SpeakSwiftly` dependency declared in `Package.swift` and locked in `Package.resolved` as the source of truth for normal `xcrun swift build` and `xcrun swift test` runs here.
2627
- Do not retarget this package to a local `../SpeakSwiftly` checkout unless the manifest is being changed intentionally for a specific local-integration task.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ If you are integrating against the server rather than just running it locally, u
408408

409409
Use [CONTRIBUTING.md](CONTRIBUTING.md) for the maintainer workflow, validation path, live end-to-end coverage, release flow, and monorepo handoff rules.
410410

411-
The maintainer release contract is now intentionally split by checkout context: use `scripts/repo-maintenance/release-prepare.sh` from a feature branch or worktree when the job is "push this release candidate, open or update the PR, and queue auto-merge," then use `scripts/repo-maintenance/release-publish.sh` from local `main` after the PR merges when the job is "cut the actual tag and GitHub release." The current details live in [docs/maintainers/release-workflow.md](docs/maintainers/release-workflow.md).
411+
The maintainer release contract is now intentionally split by checkout context: use `scripts/repo-maintenance/release-prepare.sh` from a feature branch or worktree when the job is "push this release candidate, open or update the PR, and queue auto-merge," then use `scripts/repo-maintenance/release-publish.sh` from local `main` after the PR merges when the job is "cut the actual tag and GitHub release." If local `main` is ahead of `origin/main`, that still counts as branch-side release-candidate work for this contract: get those commits onto a PR path first, then fast-forward `main` and publish from the synced release branch. The current details live in [docs/maintainers/release-workflow.md](docs/maintainers/release-workflow.md).
412412

413413
## Development
414414

docs/maintainers/release-workflow.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ The release surface is intentionally split by checkout authority:
1111

1212
That split keeps branch and worktree automation convenient without letting an unmerged feature branch publish a release tag accidentally.
1313

14+
One practical rule follows from that split: if the commits you want to release are not already on `origin/main`, you are still on the prepare side of the workflow even if those commits currently live in a local `main` checkout. Protected-branch policy and `release-publish.sh` both assume the release tip has already been merged and synced back down to local `main`.
15+
1416
## Context Rules
1517

1618
### Local `main`
@@ -23,6 +25,8 @@ scripts/repo-maintenance/release-publish.sh --version vX.Y.Z --skip-live-service
2325

2426
That path is the only supported tagged-release publisher. It syncs local `main` with `origin/main`, validates the repo unless told not to, stages the release artifact, creates the annotated tag, pushes the branch and tag, creates the GitHub release, and optionally refreshes the local LaunchAgent-backed live service.
2527

28+
If local `main` is ahead of `origin/main`, stop there. Do not try to force the publish path through that unsynced checkout. Put those commits on a feature branch if needed, run `release-prepare.sh`, merge the PR, fast-forward local `main`, and only then return to `release-publish.sh`.
29+
2630
### Local Feature Branch
2731

2832
Run:
@@ -111,6 +115,8 @@ Behavior:
111115
4. let GitHub checks run
112116
5. let auto-merge land the PR
113117

118+
If you accidentally made the release-candidate commits directly on local `main`, branch from that tip before continuing so the rest of the workflow still goes through `release-prepare.sh` and a normal PR merge.
119+
114120
### Main Publish
115121

116122
1. switch to `main`
@@ -135,4 +141,5 @@ Current defaults:
135141
- `release-publish.sh` refuses to run from any branch other than the configured release branch
136142
- `release-publish.sh` syncs the local release branch with the remote before tagging
137143
- `release-publish.sh` refuses to publish if local release-branch commits are ahead of the remote
144+
- protected `main` policies are expected to force release-candidate commits through a PR before publish
138145
- both flows require a clean worktree

0 commit comments

Comments
 (0)