Skip to content

Commit

Permalink
chore(release): fetch all refs to validate commit on main
Browse files Browse the repository at this point in the history
[no-jira]
  • Loading branch information
chris-asl committed Dec 1, 2023
1 parent 872ca9e commit 9dbd749
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Check tag name pattern follows `vX.Y.Z`
Expand All @@ -23,8 +24,6 @@ jobs:
- name: Issue a release only if a tag is based on a merged commit in `main` branch
run: |
tag_commit=$(git rev-parse ${{ github.ref }})
git fetch -f origin main
merged_commit=$(git rev-parse main)
if git merge-base --is-ancestor $tag_commit $merged_commit; then
Expand Down

0 comments on commit 9dbd749

Please sign in to comment.