1
0
mirror of https://github.com/joaquinjsb/gitea-release-please-action synced 2026-05-05 10:37:47 +02:00

fix(manifest): if "." is used it should have same outputs as node (#319)

This commit is contained in:
Benjamin E. Coe
2021-06-20 19:25:41 -04:00
committed by GitHub
parent fc09300698
commit d234c634c2
2 changed files with 13 additions and 1 deletions

View File

@@ -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)
}
}
}
}

View File

@@ -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
})
})