Skip to content

Commit

Permalink
workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
SinaSeylani committed Oct 21, 2024
1 parent 29a529d commit fb8fedb
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 0

- name: Fetch full history if shallow
run: |
Expand All @@ -99,35 +99,20 @@ jobs:
run: |
git reset --hard HEAD
- name: Force fetch the target branch (Major)
- name: Fetch and Checkout Release Branch (Major)
if: ${{ github.event.inputs.release-type == 'major' }}
run: |
git fetch origin ${{ needs.determine-next-versions.outputs.branch-major }}:refs/remotes/origin/${{ needs.determine-next-versions.outputs.branch-major }}
git checkout ${{ needs.determine-next-versions.outputs.branch-major }}
- name: Force fetch the target branch (Minor)
- name: Fetch and Checkout Release Branch (Minor)
if: ${{ github.event.inputs.release-type == 'minor' }}
run: |
git fetch origin ${{ needs.determine-next-versions.outputs.branch-minor }}:refs/remotes/origin/${{ needs.determine-next-versions.outputs.branch-minor }}
git checkout ${{ needs.determine-next-versions.outputs.branch-minor }}
- name: Force fetch the target branch (Patch)
- name: Fetch and Checkout Release Branch (Patch)
if: ${{ github.event.inputs.release-type == 'patch' }}
run: |
git fetch origin ${{ needs.determine-next-versions.outputs.branch-patch }}:refs/remotes/origin/${{ needs.determine-next-versions.outputs.branch-patch }}
- name: Switch to Release Branch (Major)
if: ${{ github.event.inputs.release-type == 'major' }}
run: |
git checkout -b ${{ needs.determine-next-versions.outputs.branch-major }} --track origin/${{ needs.determine-next-versions.outputs.branch-major }}
- name: Switch to Release Branch (Minor)
if: ${{ github.event.inputs.release-type == 'minor' }}
run: |
git checkout -b ${{ needs.determine-next-versions.outputs.branch-minor }} --track origin/${{ needs.determine-next-versions.outputs.branch-minor }}
- name: Switch to Release Branch (Patch)
if: ${{ github.event.inputs.release-type == 'patch' }}
run: |
git checkout -b ${{ needs.determine-next-versions.outputs.branch-patch }} --track origin/${{ needs.determine-next-versions.outputs.branch-patch }}
git checkout ${{ needs.determine-next-versions.outputs.branch-patch }}
- name: Verify Current Branch
run: git branch --show-current
Expand Down

0 comments on commit fb8fedb

Please sign in to comment.