mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 18:56:56 +00:00
Merge pull request #117 from mKeRix/feat/extends-versions
feat: handle versioned extends inputs correctly
This commit is contained in:
commit
f3d7b213ab
2 changed files with 8 additions and 2 deletions
|
|
@ -200,8 +200,10 @@ steps:
|
||||||
uses: cycjimmy/semantic-release-action@v3
|
uses: cycjimmy/semantic-release-action@v3
|
||||||
with:
|
with:
|
||||||
# You can extend an existing shareable configuration.
|
# You can extend an existing shareable configuration.
|
||||||
|
# And you can specify version range for the shareable configuration if you prefer.
|
||||||
extends: |
|
extends: |
|
||||||
@semantic-release/apm-config
|
@semantic-release/apm-config@^9.0.0
|
||||||
|
@mycompany/override-config
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,11 @@ exports.handleExtends = () => {
|
||||||
const extend = core.getInput(inputs.extends);
|
const extend = core.getInput(inputs.extends);
|
||||||
|
|
||||||
if (extend) {
|
if (extend) {
|
||||||
return { extends: extend };
|
const extendModuleNames = extend.split(/\r?\n/)
|
||||||
|
.map((name) => name.replace(/(?<!^)@.+/, ''))
|
||||||
|
return {
|
||||||
|
extends: extendModuleNames
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue