node-publisher 3.4.1 → 3.4.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.
- package/README.md +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -174,18 +174,22 @@ yarn
|
|
|
174
174
|
|
|
175
175
|
## Release a new version
|
|
176
176
|
|
|
177
|
-
`node-publisher` is published to npm from CI via the [`npm publish`](.github/workflows/npm-publish.yml) GitHub Actions workflow — no local npm login is required.
|
|
177
|
+
`node-publisher` is published to npm from CI via the [`npm publish`](.github/workflows/npm-publish.yml) GitHub Actions workflow. Publishing is **tokenless** — it uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers) over GitHub OIDC, so no npm token or local npm login is required.
|
|
178
178
|
|
|
179
179
|
1. **Bump the version in a PR.** Run `yarn version <patch|minor|major>` (this edits the `version` field in `package.json`; it does not create a commit or tag), or edit the field by hand. Commit, open a PR, and merge to `master`.
|
|
180
|
-
2. **Publish.** Go to **Actions → npm publish → Run workflow** and run it against `master`.
|
|
180
|
+
2. **Publish.** Go to **Actions → npm publish → Run workflow** and run it against `master`. The workflow builds the package and runs `yarn npm publish` to the Zendesk npmjs org, authenticating via OIDC.
|
|
181
181
|
|
|
182
182
|
> **Note:** publishing is restricted to the required reviewers configured on the `npm-publish` GitHub environment. Only those admins can approve and run a release.
|
|
183
183
|
|
|
184
184
|
**Prerequisites:**
|
|
185
185
|
|
|
186
|
-
- The `npm-publish` GitHub environment must exist on the repository
|
|
186
|
+
- The `npm-publish` GitHub environment must exist on the repository (managed via #ask-packaging). The `NPM_TOKEN` and `NPM_TOTP_DEVICE` secrets are only needed for the one-time trusted-publisher setup below, not for regular publishes.
|
|
187
187
|
- The `version` in `package.json` must be higher than the latest version already on [npmjs.com](https://www.npmjs.com/package/node-publisher) — npm rejects re-publishing an existing version.
|
|
188
188
|
|
|
189
|
+
**First-time setup (once per package):**
|
|
190
|
+
|
|
191
|
+
Before the first OIDC publish, the trusted publisher must be registered on npm. After the `npm-publish` environment and its `NPM_TOKEN`/`NPM_TOTP_DEVICE` secrets exist, run **Actions → npm trusted publishing → Run workflow** against `master` once. This registers this repository, the `npm-publish.yml` workflow, and the `npm-publish` environment with npm. After it succeeds, all releases publish tokenlessly via step 2 above.
|
|
192
|
+
|
|
189
193
|
# Contributing
|
|
190
194
|
|
|
191
195
|
Contributing to `node-publisher` is fairly easy, as long as the following steps are followed:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-publisher",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "A configurable release automation tool inspired by create-react-app and Travis CI.",
|
|
5
5
|
"author": "Attila Večerek <avecerek@zendesk.com>",
|
|
6
6
|
"homepage": "https://github.com/zendesk/node-publisher#readme",
|