@@ -130,20 +130,18 @@ jobs:
130130 if : matrix.variant == 'xmake'
131131 uses : xmake-io/github-action-setup-xmake@v1
132132
133- - name : Build Weasel (msbuild)
134- if : matrix.variant == 'msbuild'
133+ - name : Build Weasel
135134 shell : pwsh
136- id : msbuild_weasel
135+ id : build_weasel
136+ env :
137+ RELEASE_BUILD : ${{ (github.repository == 'rime/weasel' && startsWith(github.ref, 'refs/tags/')) && '1' || '' }}
137138 run : |
138139 $ErrorActionPreference = 'Stop'
139- .\build.bat arm64 installer
140-
141- - name : Build Weasel (xmake)
142- if : matrix.variant == 'xmake'
143- shell : cmd
144- id : xmake_weasel
145- run : |
146- .\xbuild.bat arm64 installer
140+ if ('${{ matrix.variant }}' -eq 'msbuild') {
141+ .\build.bat arm64 installer
142+ } else {
143+ .\xbuild.bat arm64 installer
144+ }
147145
148146 - name : Compress Debug Symbols
149147 if : matrix.variant == 'msbuild'
@@ -164,12 +162,12 @@ jobs:
164162
165163 # Release-only steps (run on tags or master)
166164 - name : Extract changelog
167- if : startsWith(github.ref, 'refs/tags/')
165+ if : ${{ startsWith(github.ref, 'refs/tags/') && matrix.variant == 'msbuild' }}
168166 shell : pwsh
169167 run : .\extract_changelog.ps1
170168
171169 - name : Create Nightly release
172- if : ${{ github.repository == 'rime/weasel' && github.ref == 'refs/heads/master' }}
170+ if : ${{ github.repository == 'rime/weasel' && github.ref == 'refs/heads/master' && matrix.variant == 'msbuild' }}
173171 uses : ' marvinpinto/action-automatic-releases@latest'
174172 with :
175173 repo_token : ${{ secrets.GITHUB_TOKEN }}
@@ -181,7 +179,7 @@ jobs:
181179 ./output/archives/debug_symbols.7z
182180
183181 - name : Release (stable)
184- if : ${{ github.repository == 'rime/weasel' && startsWith(github.ref, 'refs/tags/') }}
182+ if : ${{ github.repository == 'rime/weasel' && startsWith(github.ref, 'refs/tags/') && matrix.variant == 'msbuild' }}
185183 uses : softprops/action-gh-release@v2
186184 with :
187185 draft : true
0 commit comments