feat: add NPM preview release workflow and fix CI permissions (pnpm)#7470
Closed
paulbalaji wants to merge 2 commits into
Closed
Conversation
This PR adds several improvements to the release workflows for the pnpm branch:
1. **NPM Preview Release Workflow** (`.github/workflows/npm-preview-release.yml`)
- Manual dispatch workflow to publish NPM packages as preview releases
- Supports beta, alpha, rc, and preview dist-tags
- Version format: `{baseVersion}-{tag}.{gitSha}` (e.g., `19.10.0-beta.abc1234`)
- Creates GitHub pre-release with installation instructions
- Can be triggered from any branch
- Uses pnpm instead of yarn
2. **Changeset Snapshot Configuration** (`.changeset/config.json`)
- Added `snapshot` config for preview release versioning
- Uses `{tag}.{commit}` format for prerelease identifiers
3. **CI Permissions Fix** (`.github/workflows/release.yml`)
- Uses GitHub App token instead of GITHUB_TOKEN
- Fixes issue where CI wouldn't trigger on changesets PRs
- Added `title` override to pass PR title lint ("chore: release npm packages")
4. **CI Permissions Fix** (`.github/workflows/rust-release.yml`)
- Uses GitHub App token instead of GITHUB_TOKEN
- Fixes issue where CI wouldn't trigger on release PRs
**Setup Required:**
Create a GitHub App with the following:
- Permissions: Contents (read/write), Pull requests (read/write)
- Install the app on this repository
- Add these secrets:
- `HYPERLANE_GITHUB_APP_ID`: The App ID
- `HYPERLANE_GITHUB_APP_PRIVATE_KEY`: The private key
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
titleoverride to changesets action so PRs pass PR title lintNPM Preview Release Workflow
New workflow that allows publishing preview releases to NPM:
beta,alpha,rc,preview{baseVersion}-{tag}.{gitSha}(e.g.,19.10.0-beta.abc1234)Usage
Installation
After running, users can install preview packages:
CI Permissions Fix
Both NPM and Rust release workflows now use a GitHub App token instead of
GITHUB_TOKEN. This fixes the issue where merging/pushing release PRs wouldn't trigger other CI workflows.Setup Required
Create a GitHub App with:
hyperlane-release-bot(or similar)Install the app on this repository
Add these repository secrets:
HYPERLANE_GITHUB_APP_ID: The App ID from the app's settingsHYPERLANE_GITHUB_APP_PRIVATE_KEY: Generate and download a private keyTest plan
🤖 Generated with Claude Code