Skip to content

Commit bfbed2c

Browse files
author
rahul-infra
committed
fix: use PR merge ref for version preview
1 parent 8bf93cb commit bfbed2c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/version-preview.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,24 @@ jobs:
1616
name: Preview Release
1717
runs-on: ubuntu-latest
1818
steps:
19-
- name: Checkout
19+
- name: Checkout PR
2020
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
23+
ref: refs/pull/${{ github.event.pull_request.number }}/merge
2324

2425
- name: Debug git info
2526
run: |
2627
echo "Current branch: $(git branch --show-current)"
28+
echo "Current commit: $(git rev-parse HEAD)"
2729
echo "Latest commits:"
28-
git log --oneline -5
29-
echo "Tags:"
30-
git tag --sort=-v:refname | head -3
30+
git log --oneline -10
31+
echo ""
32+
echo "Latest tag:"
33+
git describe --tags --abbrev=0
34+
echo ""
35+
echo "Commits since last tag:"
36+
git log $(git describe --tags --abbrev=0)..HEAD --oneline
3137
3238
- name: Preview Next Version
3339
id: preview
@@ -37,10 +43,8 @@ jobs:
3743
dry_run: true
3844
branches: |
3945
[
40-
'+([0-9])?(.{+([0-9]),x}).x',
4146
'main',
42-
'master',
43-
{name: 'fix/*', prerelease: true}
47+
'master'
4448
]
4549
extra_plugins: |
4650
@semantic-release/changelog@6.0.0

0 commit comments

Comments
 (0)