From 18559c6158e9635d3759191e68517efeb2de0b61 Mon Sep 17 00:00:00 2001 From: Kyle Kolander Date: Thu, 28 Oct 2021 08:59:32 -0500 Subject: [PATCH] Publish single file app needs slightly different command line args - take 2 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- scripts/build.ps1 | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43926ed..f83b06f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: cat src/Directory.Build.props - name: dotnet restore - run: dotnet restore --runtime ${{ matrix.target }} --verbosity minimal -graphBuild:true + run: dotnet restore --verbosity minimal -graphBuild:true - name: dotnet build run: dotnet build --configuration ${{ env.buildConfiguration }} --runtime ${{ matrix.target }} --no-restore --nologo --verbosity minimal -graphBuild:true -p:SelfContained=false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7b5774..4f28bae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: cat src/Directory.Build.props - name: dotnet restore - run: dotnet restore --runtime ${{ matrix.target }} --verbosity minimal -graphBuild:true + run: dotnet restore --verbosity minimal -graphBuild:true # Windows - name: dotnet build win-x64 diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 8c34336..7a78715 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -15,7 +15,7 @@ function Write-Header([string]$Message) { } Write-Header 'Restore' -dotnet restore --runtime $Runtime --verbosity minimal -graphBuild:true +dotnet restore --verbosity minimal -graphBuild:true Write-Header 'Build' dotnet build --configuration $Configuration --runtime $Runtime -p:Version=$Version --no-restore --nologo --verbosity minimal -graphBuild:true -p:SelfContained=false @@ -32,8 +32,7 @@ dotnet publish .\src\Summarizer\Summarizer.csproj --output "$OutDirPublish/Summa # # https://github.com/dotnet/runtime/issues/3569#issuecomment-920285890 # -# Need to use --runtime $Runtime on each step. -# Need to use -p:SelfContained=false on each step except restore. +# Need to use --runtime $Runtime and -p:SelfContained=false on each step except restore. # # Without this, the published single file executable will not run and you'll have errors like this: #