Skip to content

Commit f96b70e

Browse files
authored
chore: remove main branch check (#203)
since v4.0.0, actions/checkout only checks out the specific ref fetched, in our case the tag from which we're building a release. as a consequence, it doesn't fetch the main branch, and does not know on which ref origin/main is. this is making the check tag step fail consistently. since the release workflow is only triggered on tag push, remove the check to fix the issue.
1 parent 6483e76 commit f96b70e

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ jobs:
1818
steps:
1919
- name: Check out
2020
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21-
- name: Check tag is on main branch
22-
run: |
23-
BRANCH=$(git branch -r --contains ${{ github.ref_name }} | grep -E '^\s*origin/main$' || true)
24-
if [ -z "$BRANCH" ]; then
25-
echo "Tag ${{ github.ref_name }} is not on main branch, skipping release"
26-
exit 1
27-
fi
2821
- name: Get Go version from go.mod file
2922
id: go-version
3023
run: echo "version=$(go mod edit -json | jq -r .Go)" >> "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)