Only match the main branch in release pipeline
otherwise when there are more branches that include the commit, the
pipeline doesn't trigger (because another branch is returned)
@@ -16,7 +16,7 @@ jobs:
- name: Fetch Branch
id: branch
run: |
- raw=$(git branch -r --contains ${{ github.ref }})
+ raw=$(git branch -r --contains ${{ github.ref }} | grep origin/main)
branch=${raw##*/}
echo "::set-output name=BRANCH_NAME::$branch"
- name: Setup Go
