Skip to content

Commit 2bfbee1

Browse files
committed
Enhance CI build detection for broader compatibility
Updates the condition for `ContinuousIntegrationBuild` to specifically check for `GITHUB_ACTIONS` or the generic `CI` environment variable. This ensures more reliable detection of continuous integration environments, particularly for GitHub Actions and other common CI hosts.
1 parent c23499c commit 2bfbee1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
<IsPackable Condition=" '$(IsWpfProject)' ">!$(DisableWpfPublish)</IsPackable>
88
<IsPackable Condition=" '$(IsFormsProject)' ">!$(DisableFormsPublish)</IsPackable>
99
<IsPackable Condition=" '$(IsUnoProject)' ">!$(DisableUnoPublish)</IsPackable>
10-
<ContinuousIntegrationBuild Condition="'$(BUILD_BUILDID)' != ''">true</ContinuousIntegrationBuild>
10+
<!-- GitHub Actions sets GITHUB_ACTIONS and CI; other CI hosts often set CI. -->
11+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true' Or '$(CI)' == 'true'">true</ContinuousIntegrationBuild>
1112
<ImplicitUsings>enable</ImplicitUsings>
1213
</PropertyGroup>
1314

0 commit comments

Comments
 (0)