Skip to content

Commit

Permalink
feat: Update action with configuration options (#518)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Watson <Kevmo92@users.noreply.github.com>
  • Loading branch information
cmitzel-ncino and Kevmo92 committed Nov 1, 2022
1 parent 2d9f77a commit 4664afe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions action.sh
Expand Up @@ -8,17 +8,19 @@ export PYPI_TOKEN="${INPUT_PYPI_TOKEN}"
export REPOSITORY_USERNAME="${INPUT_REPOSITORY_USERNAME}"
export REPOSITORY_PASSWORD="${INPUT_REPOSITORY_PASSWORD}"
export PATH="${PATH}:/semantic-release/.venv/bin"
export GIT_COMMITER_NAME="${INPUT_GIT_COMMITER_NAME:="github-actions"}"
export GIT_COMMITER_EMAIL="${INPUT_GIT_COMMITER_EMAIL:="github-actions@github.com"}"

# Change to configured directory
cd "${INPUT_DIRECTORY}"

# Set Git details
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git config --global user.name "$GIT_COMMITER_NAME"
git config --global user.email "$GIT_COMMITER_EMAIL"

# Run Semantic Release
/semantic-release/.venv/bin/python \
-m semantic_release publish \
-v DEBUG \
-D commit_author="github-actions <action@github.com>" \
-D commit_author="$GIT_COMMITER_NAME <$GIT_COMMITER_EMAIL>" \
${INPUT_ADDITIONAL_OPTIONS}
6 changes: 6 additions & 0 deletions action.yml
Expand Up @@ -22,6 +22,12 @@ inputs:
repository_password:
description: 'Password or token to the account specified in repository_username'
required: false
git_commiter_name:
description: 'The human name for the “committer” field'
required: false
git_commiter_email:
description: 'The email address for the “committer” field'
required: false

runs:
using: 'docker'
Expand Down

0 comments on commit 4664afe

Please sign in to comment.