From 670afac8ab682e158b4e390a3209d42346e72518 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Sun, 12 Sep 2021 20:52:27 -0400 Subject: [PATCH] feat: output list of paths released during manifest release (#362) --- index.js | 5 +++++ test/release-please.js | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 013c1c1..5774237 100644 --- a/index.js +++ b/index.js @@ -44,12 +44,14 @@ async function runManifest (command) { if (command === 'manifest-pr') return const releasesCreated = await factory.runCommand('manifest-release', manifestOpts) + const pathsReleased = [] if (releasesCreated) { core.setOutput('releases_created', true) for (const [path, release] of Object.entries(releasesCreated)) { if (!release) { continue } + pathsReleased.push(path) if (path === '.') { core.setOutput('release_created', true) } else { @@ -64,6 +66,9 @@ async function runManifest (command) { } } } + // Paths of all releases that were created, so that they can be passed + // to matrix in next step: + core.setOutput('paths_released', JSON.stringify(pathsReleased)) } async function main () { diff --git a/test/release-please.js b/test/release-please.js index 1a3d104..396a505 100644 --- a/test/release-please.js +++ b/test/release-please.js @@ -366,7 +366,8 @@ describe('release-please-action', () => { 'path/pkgA--release_created': true, tag_name: 'v1.0.0', upload_url: 'http://example.com', - pr: 25 + pr: 25, + paths_released: '["path/pkgA","."]' }) })