File tree 1 file changed +11
-4
lines changed 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 5
5
push :
6
6
tags :
7
7
- ' *'
8
+ branches :
9
+ - master
8
10
9
11
jobs :
10
12
variables :
28
30
29
31
- name : Set tag
30
32
id : set_tag
31
- run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
33
+ run : |
34
+ if [[ $GITHUB_REF == refs/tags/* ]]; then
35
+ echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
36
+ else
37
+ echo "VERSION=${{ steps.set_unity_version.outputs.VERSION }}-webgl2-master" >> $GITHUB_OUTPUT
38
+ fi
32
39
33
40
- name : Set target name
34
41
id : set_build_name
62
69
63
70
buildProject :
64
71
name : Create Unity WebGL Build 🏗
65
- # only build with additional parameters, the tag alone should only create a release draft
66
- if : ${{ needs.variables.outputs.TAG != needs.variables.outputs.UNITY_VERSION }}
72
+ # Build if it's a master push or if the tag is not just the unity version
73
+ if : ${{ github.ref == 'refs/heads/master' || needs.variables.outputs.TAG != needs.variables.outputs.UNITY_VERSION }}
67
74
needs : [ variables ]
68
75
runs-on : ubuntu-latest
69
76
strategy :
@@ -112,7 +119,7 @@ jobs:
112
119
createRelease :
113
120
name : Create Github release 🐙
114
121
# only run for the pure tag without build parameters
115
- if : ${{ needs.variables.outputs.TAG == needs.variables.outputs.UNITY_VERSION }}
122
+ if : ${{ github.ref_type == 'tag' && needs.variables.outputs.TAG == needs.variables.outputs.UNITY_VERSION }}
116
123
needs : [ variables ]
117
124
runs-on : ubuntu-latest
118
125
steps :
You can’t perform that action at this time.
0 commit comments