From da634863bec83f7d1516a1d726f3a0c54feb25e8 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Thu, 9 Nov 2023 14:02:02 +0100 Subject: [PATCH] fix: Update action to set git config --- action.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d9d404a..6b5f1a5 100644 --- a/action.yml +++ b/action.yml @@ -20,6 +20,14 @@ inputs: description: 'Whether packages should be versioned and published to pub.dev (default: false)' required: false default: 'false' + git-email: + description: 'The email to use when committing changes' + required: false + default: 'contact@blue-fire.xyz' + git-username: + description: 'The name to use when committing changes' + required: false + default: 'Melos Action' runs: using: composite steps: @@ -33,8 +41,14 @@ runs: - name: Add melos to PATH run: command -v melos || echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH shell: bash + - name: Set git config + if: ${{ inputs.publish == 'true' || inputs.publish-dry-run == 'true' }} + run: | + git config --global user.email "${{ inputs.git-email }}" + git config --global user.name "${{ inputs.git-username }}" + shell: bash - name: Run melos version - if: ${{ inputs.publish == 'true' }} + if: ${{ inputs.publish == 'true' || inputs.publish-dry-run == 'true' }} run: melos version --yes shell: bash - name: Run melos publish -y --dry-run