Skip to content

Commit

Permalink
wip: modifiying
Browse files Browse the repository at this point in the history
  • Loading branch information
mym0404 authored Mar 19, 2024
1 parent 6d88447 commit d7ab7f2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
tag_format:
required: false
description: 'The default tag format on semantic-release is v{version}. You can override that behavior using this option.'
repository_url:
required: false
description: 'The Git repository url. If no repository url specified, current repository will be used by default.'
outputs:
new_release_published:
description: 'Whether a new release was published'
Expand Down
15 changes: 15 additions & 0 deletions src/handleOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,18 @@ exports.handleTagFormat = () => {
return {};
}
};

/**
* Handle repository-url Option
* @returns {{}|{r: String}}
*/
exports.handleRepositoryOption = () => {
const repositoryUrl = core.getInput(inputs.repository_url);
core.debug(`repository_url input: ${repository_url}`);

if (repositoryUrl) {
return { r: repositoryUrl };
} else {
return {};
}
};
3 changes: 2 additions & 1 deletion src/inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"ci": "ci",
"extends": "extends",
"working_directory": "working_directory",
"tag_format": "tag_format"
"tag_format": "tag_format",
"repository_url": "repository_url"
}

0 comments on commit d7ab7f2

Please sign in to comment.