mstruebing
mstruebing

Reputation: 1812

Semantic release always uses semantic release bot user instead of own for git commits

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?

Upvotes: 0

Views: 1424

Answers (2)

mstruebing
mstruebing

Reputation: 1812

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 

Upvotes: 0

Ali Kahoot
Ali Kahoot

Reputation: 3589

I dont think its possible, as from https://github.com/semantic-release/exec#publishcmd there is no option to pass git user, email & signing key... You can open an issue there and ask them to add this feature request

Upvotes: 0

Related Questions