Skip to content

Commit 4777601

Browse files
author
rahul-infra
committed
test semantic changes.
1 parent c9cf5fb commit 4777601

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/release-preview.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ jobs:
6666
id: semantic
6767
env:
6868
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
# Skip git verification to avoid needing write permissions
70+
GIT_COMMITTER_NAME: "github-actions[bot]"
71+
GIT_COMMITTER_EMAIL: "github-actions[bot]@users.noreply.github.com"
72+
GIT_AUTHOR_NAME: "github-actions[bot]"
73+
GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com"
6974
run: |
7075
# Unset GitHub Actions environment variables that interfere with semantic-release
7176
unset GITHUB_REF
@@ -77,6 +82,16 @@ jobs:
7782
export GITHUB_REF="refs/heads/${{ github.event.pull_request.head.ref }}"
7883
export GITHUB_REF_NAME="${{ github.event.pull_request.head.ref }}"
7984
85+
# Mock git push to avoid permission errors (semantic-release will skip actual push in dry-run)
86+
git() {
87+
if [[ "$1" == "push" ]]; then
88+
echo "[DRY-RUN] Skipping git push verification"
89+
return 0
90+
fi
91+
command git "$@"
92+
}
93+
export -f git
94+
8095
echo "=== Debug Info ==="
8196
echo "Expected branch: ${{ github.event.pull_request.head.ref }}"
8297
echo "Current git branch: $(git branch --show-current)"

0 commit comments

Comments
 (0)