Skip to content

Commit 3b878d8

Browse files
author
rahul-infra
committed
test changes.
1 parent 789ac3c commit 3b878d8

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/release-preview.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ jobs:
1818
fetch-depth: 0
1919
ref: ${{ github.event.pull_request.head.ref }}
2020

21+
- name: Setup branch for semantic-release
22+
run: |
23+
# Explicitly checkout to the PR branch by name
24+
git checkout -B ${{ github.event.pull_request.head.ref }}
25+
echo "Current branch: $(git branch --show-current)"
26+
echo "Git status:"
27+
git status
28+
2129
- name: Setup Node.js
2230
uses: actions/setup-node@v4
2331
with:
@@ -28,6 +36,11 @@ jobs:
2836
# Backup original config
2937
cp .releaserc.json .releaserc.json.bak
3038
39+
echo "=== Original .releaserc.json ==="
40+
cat .releaserc.json.bak
41+
echo "================================"
42+
echo ""
43+
3144
# Update config for preview mode using the PR branch name
3245
cat > .releaserc.json << EOF
3346
{
@@ -43,7 +56,11 @@ jobs:
4356
}
4457
EOF
4558
46-
echo "Updated .releaserc.json for branch: ${{ github.event.pull_request.head.ref }}"
59+
echo "=== Updated .releaserc.json ==="
60+
cat .releaserc.json
61+
echo "==============================="
62+
echo ""
63+
echo "Config updated for branch: ${{ github.event.pull_request.head.ref }}"
4764
4865
- name: Run semantic-release (dry-run)
4966
id: semantic
@@ -54,7 +71,14 @@ jobs:
5471
GITHUB_REF_NAME: ${{ github.event.pull_request.head.ref }}
5572
GITHUB_HEAD_REF: ""
5673
run: |
57-
echo "Running semantic-release on branch: ${{ github.event.pull_request.head.ref }}"
74+
echo "=== Debug Info ==="
75+
echo "Expected branch: ${{ github.event.pull_request.head.ref }}"
76+
echo "Current git branch: $(git branch --show-current)"
77+
echo "GITHUB_REF: $GITHUB_REF"
78+
echo "GITHUB_REF_NAME: $GITHUB_REF_NAME"
79+
echo "GITHUB_HEAD_REF: $GITHUB_HEAD_REF"
80+
echo "=================="
81+
echo ""
5882
5983
# Run semantic-release with inline package installation (same as your local command)
6084
OUTPUT=$(npx --package semantic-release --package @semantic-release/exec --package conventional-changelog-conventionalcommits semantic-release 2>&1 || true)

0 commit comments

Comments
 (0)