Skip to content

Commit 18297cc

Browse files
committed
docs: add trusted publishing guide
1 parent d51e344 commit 18297cc

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Using OIDC trusted publishing with Lerna
2+
3+
In v9.0.0, Lerna added support for OIDC trusted publishing, which is a solution developed by npm to secure the publishing process and not use traditional tokens or other fixed credentials.
4+
5+
The key idea is that your package(s) can be configured on the npm side to be required to be published from within a specific trusted environment such as GitHub Actions or GitLab CI.
6+
7+
Within these supported environments, the OIDC token is retrieved and used to publish the package instead of a user or automation token.
8+
9+
If you follow the official guidance from npm on how to configure your pipelines, then it will also just work for Lerna (v9 and later), no additional configuration is needed.
10+
11+
https://docs.npmjs.com/trusted-publishers
12+
13+
You can see a fully working example repo here: https://github.com/JamesHenry/lerna-v9-oidc-publishing-example

website/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const sidebars = {
6161
{
6262
type: "category",
6363
label: "Recipes",
64-
items: ["recipes/using-pnpm-with-lerna"],
64+
items: ["recipes/using-pnpm-with-lerna", "recipes/oidc-trusted-publishing"],
6565
},
6666
{
6767
type: "category",

0 commit comments

Comments
 (0)