Skip to content

Commit 3e4c75d

Browse files
author
rahul-infra
committed
Made changes in release preview to check if semantic api response is fine
1 parent ceb7576 commit 3e4c75d

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

.github/workflows/release-preview.yaml

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

21-
- name: Simulate merge to main
22-
run: |
23-
git config --global user.name "github-actions[bot]"
24-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
25-
git fetch origin main
26-
git checkout -B main origin/main
27-
git merge --no-ff origin/${{ github.event.pull_request.head.ref }} -m "temp: simulate PR merge for release preview"
28-
echo "Current branch: $(git branch --show-current)"
29-
echo "Latest commits:"
30-
git log --oneline -5
31-
3221
- name: Setup Node.js
3322
uses: actions/setup-node@v4
3423
with:
@@ -39,10 +28,10 @@ jobs:
3928
# Backup original config
4029
cp .releaserc.json .releaserc.json.bak
4130
42-
# Update config for preview mode (branch is main since we merged in previous step)
43-
cat > .releaserc.json << 'EOF'
31+
# Update config for preview mode using the PR branch name
32+
cat > .releaserc.json << EOF
4433
{
45-
"branches": ["main"],
34+
"branches": ["${{ github.event.pull_request.head.ref }}"],
4635
"debug": true,
4736
"ci": false,
4837
"dryRun": true,
@@ -54,6 +43,8 @@ jobs:
5443
}
5544
EOF
5645
46+
echo "Updated .releaserc.json for branch: ${{ github.event.pull_request.head.ref }}"
47+
5748
- name: Run semantic-release (dry-run)
5849
id: semantic
5950
env:

0 commit comments

Comments
 (0)