mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-07 10:46: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
|
||||
with:
|
||||
# You can extend an existing shareable configuration.
|
||||
# And you can specify version range for the shareable configuration if you prefer.
|
||||
extends: |
|
||||
@semantic-release/apm-config
|
||||
@semantic-release/apm-config@^9.0.0
|
||||
@mycompany/override-config
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,11 @@ exports.handleExtends = () => {
|
|||
const extend = core.getInput(inputs.extends);
|
||||
|
||||
if (extend) {
|
||||
return { extends: extend };
|
||||
const extendModuleNames = extend.split(/\r?\n/)
|
||||
.map((name) => name.replace(/(?<!^)@.+/, ''))
|
||||
return {
|
||||
extends: extendModuleNames
|
||||
};
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue