I'm using semantic release and because I want to use signed commits I want to use my own git user.
I have a publishCmd
configured (@semantic-release/exec
) which is a shell script and executes some logic, including git commands.
In there I've set git config --global user.name "$GIT_USERNAME"
, git config --global user.email "$GIT_EMAIL"
and git config --global user.signingKey "$GIT_SIGNING_KEY"
in that script.
I think that should be enough for git
to be able to sign commits but the commit is always from the semantic-release-bot
instead of my own configured user.
Is there a way to use my own user instead of the semantic-release-bot
-user?
I found a hint in this plugin: https://github.com/semantic-release/git#environment-variables
I've set these environment variables and now it uses my git user. I do not use this plugin actively so it was very confusing.
GIT_AUTHOR_NAME
GIT_AUTHOR_EMAIL
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL