Skip to content

Commit ff21797

Browse files
committed
Add yarn-compatible package locators
1 parent d0037da commit ff21797

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

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

306306
- `sha`: The short SHA used. (E.g. `a832a55`)
307307
- `urls`: Space-separated URLs of published packages.
308+
- `packages`: Space-separated, Yarn-compatible package locators of published packages.
308309

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

packages/cli/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ const main = defineCommand({
541541
`urls=${outputMetadata.packages.map((pkg) => pkg.url).join(" ")}\n`,
542542
"utf8",
543543
);
544+
await fs.appendFile(
545+
GITHUB_OUTPUT,
546+
`packages=${outputMetadata.packages.map((pkg) => `${pkg.name}@${pkg.url}`).join(" ")}\n`,
547+
"utf8",
548+
);
544549
},
545550
};
546551
},

0 commit comments

Comments
 (0)