Skip to content

Add preview releases#3610

Merged
delucis merged 3 commits intowithastro:mainfrom
HiDeoo:hd/feat-preview-releases
Dec 9, 2025
Merged

Add preview releases#3610
delucis merged 3 commits intowithastro:mainfrom
HiDeoo:hd/feat-preview-releases

Conversation

@HiDeoo
Copy link
Copy Markdown
Member

@HiDeoo HiDeoo commented Dec 3, 2025

Description

As discussed, this PR adds support for preview releases in the monorepo using pkg.pr.new.

The worflow is heavily inspired by the one used in the Astro repo with the following changes:

  • Maintainers can trigger a preview release by adding the pr-preview label (it's not possible to trigger it directly using a comment).
  • A little bit stricter permissions (I don't think we need write access to the issues and id-token scope).
  • I added some comments to the step computing the packages to be included as it was not really obvious to me at first glance to understand exactly what was going on and I needed to run it locally to verify the output.
  • I also added a bit more logic to this step to compute the list of package paths as needed by the pkg-pr-new command rather than doing it later so all logic is in one place.
  • If no packages are published, the workflow errors out with a message indicating to make sure there are changesets included in the PR. I think I would prefer to see an error than waiting for the comment to show up before realizing the action succeeded but nothing was published.

Also checked the workflow using zizmor, and only an info for prefer trusted publishing for authentication is reported for pnpm dlx pkg-pr-new publish but this sounds like a false positive for pnpm publish as there is no trusted publishing possible here afaik.

If I'm not mistaken, I think we need this PR to be merged first before being able to test the entire process though so probably need a thorough review before merging in case I made any mistake.

Note that when we would want to use preview releases with #3572, we would also need to edit this workflow to include a build step.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 3, 2025

⚠️ No Changeset found

Latest commit: 2651cee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Dec 3, 2025

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit 2651cee
🔍 Latest deploy log https://app.netlify.com/projects/astro-starlight/deploys/69330e8167ffe3000777abed
😎 Deploy Preview https://deploy-preview-3610--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 14 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the 🚨 action Changes to GitHub Action workflows label Dec 3, 2025
Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HiDeoo — this will be fun to have and super helpful for sure.

Left a few questions just to make sure I understand everything!

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Copy link
Copy Markdown
Contributor

@trueberryless trueberryless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very interested to see this in action, I left some of my thoughts. Wonderful implementation so far, couldn't spot a single mistake 🙌

Co-authored-by: Felix Schneider <99918022+trueberryless@users.noreply.github.com>
Copy link
Copy Markdown
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s see how this breaks!

Just kidding — I believe in you (but not in GitHub Actions…)

@delucis delucis merged commit 4b8171c into withastro:main Dec 9, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 action Changes to GitHub Action workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants