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:
7
index.js
7
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user