Skip to content

Commit 388a048

Browse files
authored
Test NPM auto-publish with Trusted Provider setup (#45525)
1 parent 7ef4910 commit 388a048

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

.github/files/gh-npmjs-autopublisher/workflows/npmjs-autopublisher.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
- name: Publish
2727
run: |
2828
npm install -g npm@latest
29-
npm publish --access public
29+
NPM_CONFIG_PROVENANCE=false npm publish --access public

docs/monorepo.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ Most projects in the monorepo should have a mirror repository holding a built ve
376376
3. In the repo's settings, turn off wikis, issues, projects, and so on.
377377
4. Make sure that [matticbot](https://github.com/matticbot) can push to the repo. Usually no special configuration is needed for repos under the Automattic organization.
378378
5. Make sure that Actions are enabled. The build process copies workflows from `.github/files/mirror-.github` into the mirror to do useful things like automatically close PRs with a reference back to the monorepo.
379-
6. Create any secrets needed (e.g. for Autotagger or Npmjs-Autopublisher). See PCYsg-xsv-p2#mirror-repo-secrets for details.
379+
6. Set up any secrets and configuration needed (e.g. for Autotagger or Npmjs-Autopublisher). See PCYsg-xsv-p2#mirror-repo-secrets for details.
380380
2. For a PHP package (or a plugin listed in Packagist) you also need to go to packagist.org and create the package there. This requires pushing a first commit with a valid `composer.json` to the repository. That can be done by copying the new package's `composer.json` from the PR that introduced it.
381381
1. Be sure that `automattic` is added as a maintainer.
382382
2. If creating the package with your own account, make sure to link your GitHub account to Packagist so that you can sync the new package.
@@ -417,8 +417,7 @@ Note the following will also be done by the build process:
417417
418418
If `.extra.npmjs-autopublish` is set to a truthy value in the project's `composer.json`, a GitHub Action will be included in the mirror repo that will run `npm publish` when a version tag is created. This works with Autotagger. Versions must have a "v" prefix and have 3 components.
419419
420-
Note that, for this to work, you'll need to create a secret `NPMJS_AUTOMATION_TOKEN` in the mirror repo. The value of the secret must be an npmjs.com automation token for an account with the ability to publish the package.
421-
See PCYsg-xsv-p2#mirror-repo-secrets for details.
420+
You'll also need to [configure the repo as a Trusted Provider](https://docs.npmjs.com/trusted-publishers) at npmjs.com.
422421
423422
Note the following will also be done by the build process:
424423

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

projects/js-packages/eslint-changed/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.3] - 2025-10-16
9+
### Changed
10+
- Update package dependencies. [#45001]
11+
812
## [2.1.2] - 2025-08-06
913
### Changed
1014
- Update package dependencies. [#44217]
@@ -103,6 +107,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
103107

104108
* Created as a tool within the monorepo.
105109

110+
[2.1.3]: https://github.com/Automattic/eslint-changed/compare/2.1.2...2.1.3
106111
[2.1.2]: https://github.com/Automattic/eslint-changed/compare/2.1.1...2.1.2
107112
[2.1.1]: https://github.com/Automattic/eslint-changed/compare/2.1.0...2.1.1
108113
[2.1.0]: https://github.com/Automattic/eslint-changed/compare/2.0.9...2.1.0

projects/js-packages/eslint-changed/changelog/renovate-chalk-5.x

Lines changed: 0 additions & 4 deletions
This file was deleted.

projects/js-packages/eslint-changed/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@automattic/eslint-changed",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "Run eslint on files, but only report warnings and errors from lines that were changed.",
55
"keywords": [
66
"eslint",

projects/js-packages/eslint-changed/src/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Command } from 'commander';
77
import * as ESLintPkg from 'eslint';
88
import parseDiff from 'parse-diff';
99

10-
const APP_VERSION = '2.1.2';
10+
const APP_VERSION = '2.1.3';
1111

1212
const { ESLint } = ESLintPkg;
1313
const loadESLint = ESLintPkg.loadESLint ?? ( () => ESLint );

0 commit comments

Comments
 (0)