feat: add ability to unset GITHUB_ACTION env var

Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
This commit is contained in:
David van der Spek 2024-12-30 10:22:36 +01:00
parent fbe969823c
commit 266ea7eb8c
5 changed files with 12 additions and 2 deletions

View file

@ -126,8 +126,8 @@ exports.handleRepositoryUrlOption = () => {
core.debug(`repository_url input: ${repositoryUrl}`);
if (repositoryUrl) {
return { r: repositoryUrl };
return { r: repositoryUrl };
} else {
return {};
}
};
};

View file

@ -27,6 +27,11 @@ const release = async () => {
await preInstall(core.getInput(inputs.extra_plugins));
await preInstall(core.getInput(inputs.extends));
if (core.getInput(inputs.unset_gha_env) === 'true') {
core.debug('Unset GITHUB_ACTIONS environment variable');
delete process.env.GITHUB_ACTIONS;
}
const semanticRelease = await import('semantic-release');
const result = await semanticRelease.default({
...handleBranchesOption(),

View file

@ -5,6 +5,7 @@
"extra_plugins": "extra_plugins",
"dry_run": "dry_run",
"ci": "ci",
"unset_gha_env": "unset_gha_env",
"extends": "extends",
"working_directory": "working_directory",
"tag_format": "tag_format",