Skip to content

Commit

Permalink
fix: fetch all branches from origin
Browse files Browse the repository at this point in the history
  • Loading branch information
ChecksumDev committed Jul 18, 2024
1 parent ac73884 commit fcbd32e
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "BeatForge CI"
# Fetch all branches
git fetch origin
# Check out the branch
git checkout ${{ github.event.pull_request.head.ref }}
# Check if there are any changes
if [ -n "$(git status --porcelain)" ]; then
git add .
Expand Down Expand Up @@ -83,4 +86,15 @@ jobs:
# Delete local tags if they exist
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
# Delete remote tags if they exist
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
# Create new tags
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
# Push new tags
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

0 comments on commit fcbd32e

Please sign in to comment.