File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 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,
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 :
You can’t perform that action at this time.
0 commit comments