File tree Expand file tree Collapse file tree 5 files changed +30
-0
lines changed Expand file tree Collapse file tree 5 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 19
19
name : Build Mac release version
20
20
runs-on : macos-14
21
21
steps :
22
+ - name : Validate branch
23
+ if : ${{ github.ref_name != 'main' }}
24
+ run : |
25
+ echo "This workflow can only run from 'main' (got '${{ github.ref_name }}')." >&2
26
+ exit 1
27
+
22
28
- name : Checkout code
23
29
uses : actions/checkout@v3
24
30
Original file line number Diff line number Diff line change 19
19
name : Build Linux release version
20
20
runs-on : ubuntu-22.04
21
21
steps :
22
+ - name : Validate branch
23
+ if : ${{ github.ref_name != 'main' }}
24
+ run : |
25
+ echo "This workflow can only run from 'main' (got '${{ github.ref_name }}')." >&2
26
+ exit 1
27
+
22
28
- name : Checkout code
23
29
uses : actions/checkout@v3
24
30
Original file line number Diff line number Diff line change 19
19
name : Build Mac App Store release version
20
20
runs-on : macos-14
21
21
steps :
22
+ - name : Validate branch
23
+ if : ${{ github.ref_name != 'main' }}
24
+ run : |
25
+ echo "This workflow can only run from 'main' (got '${{ github.ref_name }}')." >&2
26
+ exit 1
27
+
22
28
- name : Checkout code
23
29
uses : actions/checkout@v3
24
30
Original file line number Diff line number Diff line change 19
19
name : Build Windows release version
20
20
runs-on : windows-2022
21
21
steps :
22
+ - name : Validate branch
23
+ if : ${{ github.ref_name != 'main' }}
24
+ run : |
25
+ echo "This workflow can only run from 'main' (got '${{ github.ref_name }}')." >&2
26
+ exit 1
27
+
22
28
- name : Checkout code
23
29
uses : actions/checkout@v3
24
30
Original file line number Diff line number Diff line change 31
31
release_id : ${{ steps.create_release.outputs.id }}
32
32
release_version : ${{ needs.format-version.outputs.version }}
33
33
steps :
34
+ - name : Validate branch
35
+ if : ${{ github.ref_name != 'main' }}
36
+ run : |
37
+ echo "This workflow can only run from 'main' (got '${{ github.ref_name }}')." >&2
38
+ exit 1
39
+
34
40
- name : Checkout code
35
41
uses : actions/checkout@v3
36
42
You can’t perform that action at this time.
0 commit comments