From d234c634c289f2e3fe4398b9fe234dadaa2fb486 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Sun, 20 Jun 2021 19:25:41 -0400 Subject: [PATCH] fix(manifest): if "." is used it should have same outputs as node (#319) --- index.js | 7 ++++++- test/release-please.js | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 35cd0d50..962390f5 100644 --- a/index.js +++ b/index.js @@ -45,13 +45,18 @@ async function runManifest (command) { const releasesCreated = await factory.runCommand('manifest-release', manifestOpts) if (releasesCreated) { + core.setOutput('release_created', true) core.setOutput('releases_created', true) for (const [path, release] of Object.entries(releasesCreated)) { if (!release) { continue } for (const [key, val] of Object.entries(release)) { - core.setOutput(`${path}--${key}`, val) + if (path === '.') { + core.setOutput(key, val) + } else { + core.setOutput(`${path}--${key}`, val) + } } } } diff --git a/test/release-please.js b/test/release-please.js index 82e87901..c7d0dc0e 100644 --- a/test/release-please.js +++ b/test/release-please.js @@ -345,6 +345,10 @@ describe('release-please-action', () => { { upload_url: 'http://example.com', tag_name: 'v1.0.0' + }, + '.': { + upload_url: 'http://example.com', + tag_name: 'v1.0.0' } }) @@ -356,8 +360,11 @@ describe('release-please-action', () => { sinon.assert.calledOnce(manifestReleasePRStub) assert.deepStrictEqual(output, { releases_created: true, + release_created: true, 'path/pkgA--upload_url': 'http://example.com', 'path/pkgA--tag_name': 'v1.0.0', + tag_name: 'v1.0.0', + upload_url: 'http://example.com', pr: 25 }) })