ci: configure pre-release workflow via pkg.pr.new - #8392
Conversation
In preparation for enabling/requiring Trusted Publishing and revoking folks' ability to publish manually, this configures pkg.pr.new to craete pre-releases automatically on all PRs.
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe prerelease workflow now runs for pushes to Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CONTRIBUTING.md`:
- Around line 208-209: Update the documentation text describing automatically
published installable prereleases to use the linter-approved spelling
“pre-releases,” while leaving the surrounding pkg.pr.new workflow instructions
unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ee51ab12-528c-47d8-88a9-3329ee2289af
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
.github/workflows/pre-release.ymlCONTRIBUTING.mdpackage.json
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
netlify/blueprints(manual)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc5cc2d3e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| env: | ||
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
| - name: Publish prerelease | ||
| run: npm exec -- pkg-pr-new publish |
There was a problem hiding this comment.
Add previewVersion to prerelease publishes
Because this replaces the old flow that ran npm version <version>-<tag> before publishing, invoking pkg-pr-new publish without --previewVersion packs previews with the unchanged source version from package.json (currently 27.1.0). When someone installs a PR/main preview into a project, the lockfile and netlify --version/telemetry identify it as the real release version, and lockfiles can keep resolving that same-version preview tarball even after the actual npm release; pass --previewVersion so each preview gets a distinct preview version.
Useful? React with 👍 / 👎.
Summary
In preparation for enabling/requiring Trusted Publishing and revoking folks' ability to publish manually, this configures pkg.pr.new to craete pre-releases automatically on all PRs.