@luxass/npm-staged-release-sandbox 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +13 -2
  2. package/index.js +7 -0
  3. package/package.json +15 -3
package/README.md CHANGED
@@ -1,3 +1,14 @@
1
- # Temporary Holding Version
1
+ # Experimental npm staged release sandbox
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This repository tests npm staged publishing from GitHub Actions. Its package, `@luxass/npm-staged-release-sandbox`, is a disposable fixture. Do not use it in production.
4
+
5
+ The [release workflow](.github/workflows/release.yaml) calls the experimental workflow from [shared-workflows PR #85](https://github.com/luxass/shared-workflows/pull/85). It stages a version on npm, then waits until npm serves it before it creates a Git tag and publishes the GitHub release notes.
6
+
7
+ ## Run the experiment
8
+
9
+ 1. Publish the baseline version (`0.0.1`) manually with `npm publish --access public`.
10
+ 2. In GitHub, create the `npm-registry` and `release-approval` environments. Restrict both to the default branch and require a reviewer. If you test alone, do not enable prevention of self-review.
11
+ 3. In npm, configure a [stage-only trusted publisher](https://docs.npmjs.com/trusted-publishers/) for `luxass/npm-staged-release-sandbox`. Use `release.yaml` as the workflow filename and `npm-registry` as the environment.
12
+ 4. Bump `package.json` to `0.0.2` and push the commit to `main`. Dispatch **Experimental npm Release** from `main`. Leave the notes input blank to test automatic release notes, or enter an optional intro.
13
+ 5. Approve the `npm-registry` job. Once staging finishes, make sure that npm lists the staged version but does not serve it. The `v0.0.2` tag and GitHub release must not exist yet.
14
+ 6. Approve the version on npm with 2FA. Then approve `release-approval` on GitHub. Make sure that npm serves the version, the tag points to the dispatched commit, and the GitHub release shows the notes you entered.
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ /** A fixture export for testing package installs. */
2
+ export const experimentalReleaseFixture = true;
3
+
4
+ /** Returns a stable value for an install smoke test. */
5
+ export function smokeTest() {
6
+ return "ok";
7
+ }
package/package.json CHANGED
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "name": "@luxass/npm-staged-release-sandbox",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.2",
4
+ "description": "Experimental fixture for testing npm staged publishing. Not for production use.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "exports": "./index.js",
8
+ "files": [
9
+ "index.js"
10
+ ],
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/luxass/npm-staged-release-sandbox.git"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ }
6
18
  }