|
13 | 13 | - [Contribute Documentation](#contribute-documentation) |
14 | 14 | - [Contribute Code](#contribute-code) |
15 | 15 | - Manage Something ✅🙆🏼💃👔 |
| 16 | + - [Preview Your Changes Before Release](#preview-your-changes-before-release) |
16 | 17 | - [Create a Release](#create-a-release) |
17 | 18 | - [Release Version Calculation](#release-version-calculation) |
18 | 19 | - [Help! The release failed after the packages were published to the NPM registry](#help-the-release-failed-after-the-packages-were-published-to-the-npm-registry) |
@@ -160,6 +161,33 @@ Once you've filed the PR: |
160 | 161 | - If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's okay! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 |
161 | 162 | - If your PR gets accepted, it will be marked as such, and merged into the `main` branch soon after. Your contribution will be distributed to the masses next time the maintainers [create a release](#create-a-release) |
162 | 163 |
|
| 164 | +## Preview Your Changes Before Release |
| 165 | + |
| 166 | +Whilst developing new features it's possible to publish and install preview builds of every affected package using [pkg.pr.new](https://pkg.pr.new) — a free open-source service that builds and hosts SHA-keyed npm tarballs. |
| 167 | + |
| 168 | +To opt in: |
| 169 | + |
| 170 | +1. Add the `preview` label to your PR. |
| 171 | +2. CI builds every workspace and publishes the affected packages to pkg.pr.new. |
| 172 | +3. The [`pkg-pr-new[bot]`](https://github.com/apps/pkg-pr-new) posts a comment on the PR with one installable URL per affected package. |
| 173 | + |
| 174 | +Consumers install the preview by URL: |
| 175 | + |
| 176 | +```bash |
| 177 | +npm i https://pkg.pr.new/grafana/plugin-tools/@grafana/<package-name>@<commit-sha> |
| 178 | +``` |
| 179 | + |
| 180 | +For CLI packages (`create-plugin`, `plugin-docs-cli`, `plugin-meta-extractor`, `plugin-types-bundler`, `react-detect`, `sign-plugin`), you can also run the binary directly without installing: |
| 181 | + |
| 182 | +```bash |
| 183 | +npx https://pkg.pr.new/grafana/plugin-tools/@grafana/<cli-package>@<commit-sha> |
| 184 | +``` |
| 185 | + |
| 186 | +> [!IMPORTANT] |
| 187 | +> The URL keys off the commit SHA, not a real semver version. Any `package.json` reference to a pkg.pr.new URL must be swapped back to the published version once the PR is merged and released. |
| 188 | +
|
| 189 | +When you push new commits to a PR with the `preview` label, the existing pkg.pr.new comment is updated in place with the new commit SHA. |
| 190 | + |
163 | 191 | ## Create A Release |
164 | 192 |
|
165 | 193 | Releases are managed by [Auto](https://intuit.github.io/auto/index) and PR labels. |
|
0 commit comments