You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,19 +188,24 @@ We closely watch our issues and have a pretty active [Slack workspace](https://c
188
188
This guide is intended for core team members that have the necessary
189
189
rights to publish new releases on npm.
190
190
191
-
Before using the automated npm publishing flow, make sure npm trusted publishing is configured for the `preactjs/preact` repository, the `release.yml` workflow, and the `npm` environment. The GitHub `npm` environment should require reviewer approval, and repository rules should protect `11.*` tags.
191
+
Before using the automated npm publishing flow, make sure npm trusted publishing is configured for the `preactjs/preact` repository, the `release.yml` workflow, and the `npm` environment. The trusted publisher must allow `npm stage publish`. The GitHub `npm` environment should require reviewer approval, and repository rules should protect `11.*` tags.
192
192
193
193
1. Make a PR where **only** the version number is incremented in `package.json` and everywhere else. A simple search and replace works. (note: We follow `SemVer` conventions)
194
194
2. Wait until the PR is approved and merged.
195
195
3. Switch back to the `main` branch and pull the merged PR
196
196
4. Create and push a tag for the new version you want to publish:
197
197
1.`git tag 11.0.0`
198
198
2.`git push origin 11.0.0`
199
-
5. Wait for the Release workflow to reach the `npm` environment approval gate, approve it, and let it complete
200
-
- It'll validate that the tag matches the package version, create a draft release, upload the built npm package as a release asset, and publish it to npm.
201
-
- Stable releases publish to the `latest` npm dist-tag; prereleases publish to the approved prerelease dist-tag (`alpha`, `beta`, `rc`, or `next`).
202
-
6.[Fill in the release notes](#writing-release-notes) in GitHub and publish them
203
-
7. Tweet it out
199
+
5. Open the tag's **Release** workflow in GitHub Actions and wait for the `publish` job to request approval for the `npm` environment.
200
+
- Before this gate, the workflow builds and tests the tag, creates a draft GitHub release, and uploads the exact npm tarball as a release asset.
201
+
- Review the workflow, tag, commit, and tarball. Then approve the deployment to the `npm` environment.
202
+
- The `publish` job validates that the package name and version match the tag, selects the npm dist-tag, and submits the tarball with `npm stage publish`. A successful job means the package is staged; it is **not public yet**.
203
+
6. Open the **Staged Packages** tab on npmjs.com and review the staged `preact` package.
204
+
- Stable releases use the `latest` npm dist-tag; prereleases use the approved prerelease dist-tag (`alpha`, `beta`, `rc`, or `next`).
205
+
- Approve the staged package and complete the 2FA challenge. This is the step that publishes it to the live npm registry.
206
+
- Verify the new version and expected dist-tag with `npm view preact@11.0.0 version dist-tags --json`.
207
+
7.[Fill in the release notes](#writing-release-notes) in GitHub and publish them
0 commit comments