From ba9ae4b945c4dda425d75ca20907c435ed85e0c2 Mon Sep 17 00:00:00 2001 From: Antoine Milochau <48644548+amilochau@users.noreply.github.com> Date: Sat, 10 Feb 2024 13:59:22 +0100 Subject: [PATCH] Disable dotnet logo and telemetry by default --- build/netcore/action.yml | 9 +++++++++ release/nuget/action.yml | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/build/netcore/action.yml b/build/netcore/action.yml index d182ae48..dbad3fbe 100644 --- a/build/netcore/action.yml +++ b/build/netcore/action.yml @@ -30,9 +30,18 @@ runs: - name: Restore packages shell: pwsh run: dotnet restore ${{ inputs.projectsToBuild }} --verbosity ${{ inputs.VERBOSITY }} + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true - name: Build application shell: pwsh run: dotnet build ${{ inputs.projectsToBuild }} --configuration Release --no-restore --verbosity ${{ inputs.VERBOSITY }} + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true - name: Test application shell: pwsh run: dotnet test ${{ inputs.projectsToTest }} --configuration Release --no-restore --no-build --verbosity ${{ inputs.VERBOSITY }} + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true diff --git a/release/nuget/action.yml b/release/nuget/action.yml index c5b40b0d..ecf716a2 100644 --- a/release/nuget/action.yml +++ b/release/nuget/action.yml @@ -46,12 +46,21 @@ runs: - name: Restore packages shell: pwsh run: dotnet restore ${{ inputs.projectsToBuild }} --verbosity ${{ inputs.VERBOSITY }} + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true - name: Build application shell: pwsh run: dotnet build ${{ inputs.projectsToBuild }} --configuration Release --no-restore --verbosity ${{ inputs.VERBOSITY }} + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true - name: Pack application shell: pwsh run: dotnet pack ${{ inputs.projectsToPack }} --configuration Release --no-restore --no-build --output ./build --verbosity ${{ inputs.VERBOSITY }} + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true - name: Release NuGet with script id: release shell: pwsh @@ -64,3 +73,6 @@ runs: - name: Publish packages to nuget.org shell: pwsh run: dotnet nuget push ./build/*.nupkg --api-key ${{ inputs.nugetOrgToken }} --source https://api.nuget.org/v3/index.json + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true