Split git tag and github release options (#680)

* Split git tag and github release options

* Rename to push-git-tags

* Validate inputs
This commit is contained in:
Bjorn Lu
2026-07-01 07:30:13 +00:00
committed by GitHub
parent 0eae789230
commit ca57073900
6 changed files with 55 additions and 6 deletions
+10
View File
@@ -20,6 +20,15 @@ async function main() {
const script = getOptionalInput("script");
const packDirArtifactId = getOptionalInput("pack-dir-artifact-id");
const createGithubReleases = core.getBooleanInput("create-github-releases");
const pushGitTags = core.getBooleanInput("push-git-tags");
if (createGithubReleases && !pushGitTags) {
throw new Error(
"The input 'create-github-releases' is set to true, but 'push-git-tags' is set to false. " +
"Creating GitHub releases requires pushing git tags. Please set 'push-git-tags' to true " +
"or set 'create-github-releases' to false.",
);
}
// If the user needs to change the cwd, set `working-directory` in the step instead
const cwd = process.cwd();
@@ -39,6 +48,7 @@ async function main() {
script,
github,
createGithubReleases,
pushGitTags,
cwd,
fromPackDir,
});