Skip to content

Commit a949774

Browse files
committed
fix: pipeline
1 parent 3f8684d commit a949774

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,21 @@ permissions:
1111
jobs:
1212
release:
1313
runs-on: ubuntu-latest
14-
if: startsWith(github.ref, 'refs/tags/v') && github.ref_type == 'tag' && github.base_ref == 'master'
14+
if: startsWith(github.ref, 'refs/tags/v') && github.ref_type == 'tag'
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v3
1818

19+
- name: Check if tag is from master
20+
run: |
21+
git fetch origin master
22+
if git merge-base --is-ancestor origin/master $GITHUB_SHA; then
23+
echo "Tag is from master"
24+
else
25+
echo "Tag is not from master. Exiting."
26+
exit 1
27+
fi
28+
1929
- name: Set up Go
2030
uses: actions/setup-go@v5
2131
with:

0 commit comments

Comments
 (0)