Skip to content

Commit

Permalink
feat: create GitHub release (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoieni authored Jan 8, 2023
1 parent b0889d1 commit b6f4c4d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
default: "false"
required: false
no_changelog:
description: "Don't create changelog. (Default: `false`)."
description: "Don't create/update changelog. (Default: `false`)."
default: "false"
required: false
project_manifest:
Expand All @@ -23,6 +23,10 @@ inputs:
changelog_config:
description: "Path to the git cliff configuration file. Defaults to the `keep a changelog` configuration."
required: false
git_release:
description: "Publish the GitHub release for the created git tag. (Default: `true`)"
default: "true"
required: false
args:
description: "release-plz additional arguments."
required: false
Expand Down
11 changes: 10 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ else
UPDATE_DEPENDENCIES=""
fi

if [[ "${INPUT_GIT_RELEASE}" == "true" ]]
then
GIT_RELEASE="--git-release --git-token ${GITHUB_TOKEN}"
else
echo "Git release disabled."
GIT_RELEASE=""
fi

if [[ -n "${INPUT_REGISTRY}" ]]
then
echo "using registry '${INPUT_REGISTRY}'"
Expand Down Expand Up @@ -49,7 +57,7 @@ git config --global user.name "release-plz"
if [[ -z "${INPUT_COMMAND}" || "${INPUT_COMMAND}" == "release-pr" ]]
then
release-plz release-pr\
--github-token ${GITHUB_TOKEN}\
--git-token ${GITHUB_TOKEN}\
--repo-url https://github.com/${GITHUB_REPOSITORY}\
${NO_CHANGELOG}\
${UPDATE_DEPENDENCIES}\
Expand All @@ -65,6 +73,7 @@ release-plz release\
${ALT_REGISTRY}\
${PROJECT_MANIFEST}\
${CHANGELOG_CONFIG}\
${GIT_RELEASE}\
${INPUT_ARGS}
fi

Expand Down

0 comments on commit b6f4c4d

Please sign in to comment.