Skip to content

Commit 9653929

Browse files
committed
updates
1 parent c62debb commit 9653929

File tree

1 file changed

+11
-156
lines changed

1 file changed

+11
-156
lines changed

RELEASE.md

Lines changed: 11 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
1. Create a release by triggering the [Turborepo Release][1] workflow
88

99
- Specify the semver increment using the SemVer Increment field (start with `prerelease`)
10-
- Check the "Dry Run" box to run the full release workflow without publishing any packages.
10+
- Check the "Dry Run" box to run the full release workflow without publishing any packages. Artifacts will be created that you can test with locally.
1111

1212
2. A PR is automatically opened to merge the release branch created in step 1 back into `main`
1313

14-
- ⚠️ Merge this in! You don't need to wait for tests to pass. It's important to merge this branch soon after the
15-
publish is successful
14+
- ⚠️ Merge this in! You don't need to wait for tests to pass (because they won't pass until after this PR is merged in). It's important to merge this branch soon after the publish is successful.
1615

1716
### Release `@turbo/repository`
1817

@@ -53,23 +52,12 @@ The Turborepo release process is a multi-stage pipeline that:
5352
2. **Builds Rust binaries** for 6 different platforms (macOS, Linux, Windows on x64 and ARM64)
5453
3. **Packages native binaries** as separate npm packages (e.g., `turbo-darwin-64`, `turbo-linux-arm64`)
5554
4. **Publishes JavaScript packages** (main `turbo` package, `create-turbo`, codemods, ESLint plugins, etc.)
56-
5. **Creates a staging branch** with version bumps and automatically opens a PR to merge back to `main`
55+
5. **Creates a release branch** with version bumps and automatically opens a PR to merge back to `main`
5756

5857
The entire process is orchestrated through a GitHub Actions workflow located at `.github/workflows/turborepo-release.yml`.
5958

6059
---
6160

62-
### Prerequisites
63-
64-
Before triggering a release, ensure:
65-
66-
1. **npm Access**: You have publishing rights to the `vercel` npm organization
67-
2. **GitHub Permissions**: You can trigger GitHub Actions workflows on the `vercel/turborepo` repository
68-
3. **Clean Working Directory**: No unpushed commits on `main` (the workflow will verify this)
69-
4. **Passing CI**: All tests should be passing on `main` before releasing
70-
71-
---
72-
7361
### Version Management
7462

7563
#### Version Storage
@@ -308,27 +296,13 @@ See: `cli/Makefile` (publish-turbo target)
308296
**Why fixed order?**
309297

310298
- Prevents race conditions where dependent packages are published before their dependencies
311-
- Ensures `turbo` is published first so other packages can reference it
299+
- Ensures `turbo` is published last so the platform specific binaries that it depends on are available.
312300

313301
**Dry Run**: If the workflow was triggered with `dry_run: true` or the Makefile is called with `--skip-publish`, the publish commands are skipped, allowing you to test the entire pipeline without publishing.
314302

315-
#### Stage 6: Create Release PR
303+
#### Stage 6: Merge Release PR
316304

317-
**Job**: `create-release-pr` (depends on `stage` and `npm-publish`)
318-
319-
**Steps**:
320-
321-
1. Checkout the staging branch
322-
2. Extract version from `version.txt` (first line)
323-
3. Create pull request using `thomaseizinger/create-pull-request@master`:
324-
- **Head**: `staging-$(VERSION)` (e.g., `staging-2.6.2`)
325-
- **Base**: `main`
326-
- **Title**: `"release(turborepo): $(VERSION)"`
327-
- **Body**: Auto-generated with commit details
328-
329-
**Only runs if**: `dry_run` is `false`
330-
331-
**Important**: Merge this PR soon after the publish succeeds. This brings the version bump commits back into `main` so the next release starts from the correct version.
305+
A release PR is automatically generated. Merge it as soon as possible after publishing has completed.
332306

333307
---
334308

@@ -410,117 +384,6 @@ See: `packages/turbo-releaser/` for the Windows wrapper generation
410384

411385
---
412386

413-
### Troubleshooting
414-
415-
#### Release Failed During Smoke Tests
416-
417-
**Symptom**: `rust-smoke-test` or `js-smoke-test` job failed
418-
419-
**Solution**:
420-
421-
1. Check the test logs to identify which test failed
422-
2. Fix the issue on `main` branch
423-
3. Wait for CI to pass
424-
4. Trigger a new release (the version will be incremented from the failed version)
425-
426-
#### Release Failed During Build
427-
428-
**Symptom**: `build-rust` job failed for a specific platform
429-
430-
**Possible Causes**:
431-
432-
- Cross-compilation dependencies missing (e.g., musl-tools)
433-
- Rust compiler error on specific platform
434-
- Protoc/Cap'n Proto codegen issue
435-
436-
**Solution**:
437-
438-
1. Check the build logs for the specific platform
439-
2. If it's a platform-specific issue, you may need to update the build scripts or CI configuration
440-
3. If it's a code issue, fix it on `main` and re-trigger the release
441-
442-
#### Release Failed During Publish
443-
444-
**Symptom**: `npm-publish` job failed
445-
446-
**Possible Causes**:
447-
448-
- npm authentication issue (expired `NPM_TOKEN`)
449-
- Package already exists with that version (you may have manually published)
450-
- npm registry timeout or outage
451-
452-
**Solution**:
453-
454-
1. **If authentication**: Regenerate the `NPM_TOKEN` in GitHub Secrets
455-
2. **If already published**:
456-
- Check npm to see which packages were published
457-
- If partial publish, you may need to manually publish the remaining packages
458-
- For canary releases, you can increment and try again
459-
3. **If registry issue**: Wait and re-trigger
460-
461-
#### Version.txt Not Updated
462-
463-
**Symptom**: Error message "Refusing to publish with unupdated version.txt"
464-
465-
**Cause**: The `scripts/version.js` didn't modify `version.txt`
466-
467-
**Solution**:
468-
469-
- This is a safety check. If you see this, it means something is wrong with the version calculation
470-
- Check the `scripts/version.js` logs to see why it didn't update the file
471-
- This should never happen in normal operation; file a bug if it does
472-
473-
#### Unpushed Commits Detected
474-
475-
**Symptom**: Error message "Refusing to publish with unpushed commits"
476-
477-
**Cause**: There are commits on your local `main` that aren't on origin
478-
479-
**Solution**:
480-
481-
- This should never happen in the GitHub Actions workflow since it always checks out from origin
482-
- If testing locally, push your commits or use a clean checkout
483-
484-
#### Platform Package Not Found
485-
486-
**Symptom**: Users report "Could not resolve turbo binary for platform ..."
487-
488-
**Cause**:
489-
490-
- The platform package wasn't published
491-
- User is on an unsupported platform
492-
- npm has propagation delay (rare)
493-
494-
**Solution**:
495-
496-
1. **Check npm**: Verify the platform package exists: `npm view turbo-<platform>-<arch>`
497-
2. **If missing**: Manually publish the platform package
498-
3. **If unsupported platform**: File an issue to add support for that platform
499-
4. **If propagation delay**: Wait 5-10 minutes and try again
500-
501-
#### Release PR Not Created
502-
503-
**Symptom**: No PR was opened after successful release
504-
505-
**Cause**:
506-
507-
- `dry_run` was set to `true`
508-
- `create-release-pr` job failed
509-
510-
**Solution**:
511-
512-
1. Check if `dry_run` was enabled in the workflow inputs
513-
2. Check the `create-release-pr` job logs for errors
514-
3. Manually create the PR if needed:
515-
```bash
516-
gh pr create \
517-
--head staging-<version> \
518-
--base main \
519-
--title "release(turborepo): <version>"
520-
```
521-
522-
---
523-
524387
### Technical Reference
525388

526389
#### Key Scripts and Commands
@@ -554,19 +417,11 @@ See: `Cargo.toml` (release-turborepo profile)
554417

555418
#### Workflow Inputs Reference
556419

557-
| Input | Type | Required | Default | Description |
558-
| ----------------- | ------- | -------- | ------------ | -------------------------------------------------------------------------------------------------- |
559-
| `increment` | choice | Yes | `prerelease` | SemVer increment type: `prerelease`, `prepatch`, `preminor`, `premajor`, `patch`, `minor`, `major` |
560-
| `dry_run` | boolean | No | `false` | Skip npm publish and PR creation (test mode) |
561-
| `tag-override` | string | No | - | Override npm dist-tag (e.g., for backports) |
562-
| `ci-tag-override` | string | No | - | Override npm dist-tag for running tests |
563-
| `sha` | string | No | - | Override SHA to build from (rarely used) |
564-
565-
#### Workflow Outputs Reference
566-
567-
| Output | Source Job | Description |
568-
| -------------- | ---------- | -------------------------------------------------- |
569-
| `stage-branch` | `stage` | Name of the staging branch (e.g., `staging-2.6.2`) |
420+
| Input | Type | Required | Default | Description |
421+
| -------------- | ------- | -------- | ------------ | -------------------------------------------------------------------------------------------------- |
422+
| `increment` | choice | Yes | `prerelease` | SemVer increment type: `prerelease`, `prepatch`, `preminor`, `premajor`, `patch`, `minor`, `major` |
423+
| `dry_run` | boolean | No | `false` | Skip npm publish and PR creation (test mode) |
424+
| `tag-override` | string | No | - | Override npm dist-tag (e.g., for backports) |
570425

571426
#### Common npm Dist-tags
572427

0 commit comments

Comments
 (0)