We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f8684d commit a949774Copy full SHA for a949774
.github/workflows/release.yml
@@ -11,11 +11,21 @@ permissions:
11
jobs:
12
release:
13
runs-on: ubuntu-latest
14
- if: startsWith(github.ref, 'refs/tags/v') && github.ref_type == 'tag' && github.base_ref == 'master'
+ if: startsWith(github.ref, 'refs/tags/v') && github.ref_type == 'tag'
15
steps:
16
- name: Checkout code
17
uses: actions/checkout@v3
18
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
+
29
- name: Set up Go
30
uses: actions/setup-go@v5
31
with:
0 commit comments