From 259855416015daf367c4dc6c106725650e4b6b6b Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Thu, 16 May 2024 11:05:18 -0300 Subject: [PATCH] Ensure ILRepack is only run on Windows, as well as pack/push --- .github/workflows/build.yml | 6 +----- src/CredentialManager/CredentialManager.csproj | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d37453..7c60ebe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,8 +54,6 @@ jobs: fetch-depth: 0 - name: 🙏 build - env: - CustomAfterMicrosoftCommonTargets: ${{ github.workspace }}/src/NuGetize.targets run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" - name: ⚙ GNU grep @@ -68,11 +66,9 @@ jobs: uses: ./.github/workflows/test - name: 📦 pack - env: - CustomAfterMicrosoftCommonTargets: ${{ github.workspace }}/src/NuGetize.targets run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" - # Only push CI package to sleet feed if building on ubuntu (fastest) + # Only push CI package to sleet feed if building on windows (can't run ILRepack on linux/macOS) - name: 🚀 sleet env: SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }} diff --git a/src/CredentialManager/CredentialManager.csproj b/src/CredentialManager/CredentialManager.csproj index c01bdb7..55a8ca6 100644 --- a/src/CredentialManager/CredentialManager.csproj +++ b/src/CredentialManager/CredentialManager.csproj @@ -28,7 +28,7 @@ Usage: Inputs="@(IntermediateAssembly -> '%(FullPath)')" Outputs="$(IntermediateOutputPath)ilrepack.txt" Returns="@(MergedAssemblies)" - Condition="Exists(@(IntermediateAssembly -> '%(FullPath)'))"> + Condition="$(OS) == 'WINDOWS_NT' And Exists(@(IntermediateAssembly -> '%(FullPath)'))">