Skip to content

Commit 7445b5c

Browse files
cometkimAmirSa12
authored andcommitted
Add yarn-compatible package locators
1 parent 3f08433 commit 7445b5c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ After `pkg-pr-new publish` runs successfully, some outputs are available.
309309

310310
- `sha`: The short SHA used. (E.g. `a832a55`)
311311
- `urls`: Space-separated URLs of published packages.
312+
- `packages`: Space-separated, Yarn-compatible package locators of published packages.
312313

313314
This is useful for using published packages in other subsequent jobs immediately after publishing. (E.g. E2E tests)
314315

packages/cli/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,11 @@ const main = defineCommand({
561561
`urls=${outputMetadata.packages.map((pkg) => pkg.url).join(" ")}\n`,
562562
"utf8",
563563
);
564+
await fs.appendFile(
565+
GITHUB_OUTPUT,
566+
`packages=${outputMetadata.packages.map((pkg) => `${pkg.name}@${pkg.url}`).join(" ")}\n`,
567+
"utf8",
568+
);
564569
},
565570
};
566571
},

0 commit comments

Comments
 (0)