From d7ab7f2e6d94327ae2d60b2aa8feb7276609bb6f Mon Sep 17 00:00:00 2001 From: MJ Studio Date: Tue, 19 Mar 2024 17:26:21 +0900 Subject: [PATCH] wip: modifiying --- action.yml | 3 +++ src/handleOptions.js | 15 +++++++++++++++ src/inputs.json | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e429a1a..45a53a8 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/src/handleOptions.js b/src/handleOptions.js index 79c2ea5..b91b41e 100644 --- a/src/handleOptions.js +++ b/src/handleOptions.js @@ -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 {}; + } +}; \ No newline at end of file diff --git a/src/inputs.json b/src/inputs.json index 55c4947..244af82 100644 --- a/src/inputs.json +++ b/src/inputs.json @@ -7,5 +7,6 @@ "ci": "ci", "extends": "extends", "working_directory": "working_directory", - "tag_format": "tag_format" + "tag_format": "tag_format", + "repository_url": "repository_url" }