Skip to content

Commit 061ffd9

Browse files
author
rahul-infra
committed
fix: create temp branch for semantic-release analysis
1 parent cf20237 commit 061ffd9

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

.github/workflows/version-preview.yaml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323

24-
- name: Debug Git State
24+
- name: Create temporary branch
2525
run: |
26-
echo "Current branch: $(git branch --show-current)"
27-
echo "Current HEAD: $(git rev-parse HEAD)"
28-
echo ""
29-
echo "Latest 5 commits:"
30-
git log --oneline -5
31-
echo ""
32-
echo "Latest tag:"
33-
git describe --tags --abbrev=0 || echo "No tags found"
34-
echo ""
35-
echo "Commits since last tag:"
36-
git log $(git describe --tags --abbrev=0 2>/dev/null || echo "HEAD~10")..HEAD --oneline || echo "Cannot determine"
26+
echo "Current state: detached HEAD"
27+
echo "Creating temporary branch for semantic-release..."
28+
git checkout -b temp-preview-branch
29+
echo "Now on branch: $(git branch --show-current)"
3730
3831
- name: Semantic Release (Dry Run)
3932
id: semantic
@@ -43,13 +36,7 @@ jobs:
4336
dry_run: true
4437
branches: |
4538
[
46-
'+([0-9])?(.{+([0-9]),x}).x',
47-
'main',
48-
'master',
49-
{
50-
name: '*',
51-
prerelease: true
52-
}
39+
'temp-preview-branch'
5340
]
5441
extra_plugins: |
5542
@semantic-release/changelog@6.0.0

0 commit comments

Comments
 (0)