File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -61,17 +61,22 @@ jobs:
6161 - name : Create git tag if missing
6262 run : |
6363 TAG="${{ steps.pkg.outputs.tag }}"
64- git fetch --tags
64+
65+ # Get latest refs safely
66+ git fetch --tags origin
67+ git fetch origin main
68+
69+ # Work on the remote tip to avoid local-branch/upstream issues
70+ git checkout --detach origin/main
71+
72+ # Create annotated tag if it doesn't already exist
6573 if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
6674 echo "Tag $TAG already exists, continuing."
6775 else
68- git fetch origin main:main
69- git checkout main
70- git pull --ff-only
7176 git tag -a "$TAG" -m "Release $TAG"
7277 git push origin "$TAG"
7378 fi
74-
79+
7580 - name : Create or Update GitHub Release
7681 id : release
7782 uses : softprops/action-gh-release@v2
You can’t perform that action at this time.
0 commit comments