From fc4cd21eaee594046802b45e8e3ad9709cf00c4a Mon Sep 17 00:00:00 2001 From: Skylar Date: Wed, 22 Feb 2023 13:20:00 -0800 Subject: [PATCH 1/6] Add support for publishing a single file executable --- VSConfigFinder/VSConfigFinder.csproj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/VSConfigFinder/VSConfigFinder.csproj b/VSConfigFinder/VSConfigFinder.csproj index 5e80ddb..6283e16 100644 --- a/VSConfigFinder/VSConfigFinder.csproj +++ b/VSConfigFinder/VSConfigFinder.csproj @@ -1,10 +1,12 @@ - + Exe net7.0 enable enable + true + true From 466d894472d87cae16186d88c5a8d493b92f8fec Mon Sep 17 00:00:00 2001 From: Skylar Date: Wed, 22 Feb 2023 15:27:43 -0800 Subject: [PATCH 2/6] Add a few more changes for signing --- Directory.Build.props | 18 ++++++++++++++++++ VSConfigFinder/VSConfigFinder.csproj | 16 ++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Directory.Build.props b/Directory.Build.props index 84068b4..dbc3b3b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,4 +6,22 @@ 3.5.119 + + + + + true + + + + + + + \ No newline at end of file diff --git a/VSConfigFinder/VSConfigFinder.csproj b/VSConfigFinder/VSConfigFinder.csproj index 6283e16..83e858a 100644 --- a/VSConfigFinder/VSConfigFinder.csproj +++ b/VSConfigFinder/VSConfigFinder.csproj @@ -7,10 +7,26 @@ enable true true + true + $(OutputPath)$(RuntimeIdentifier)\publish\ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + Microsoft400 + StrongName + + + Microsoft400 + From 5a01752b7491e861a24c3ee0dabc9b64df783fca Mon Sep 17 00:00:00 2001 From: Skylar Date: Wed, 22 Feb 2023 15:43:12 -0800 Subject: [PATCH 3/6] Add mb signing plugin --- vsts-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vsts-ci.yml b/vsts-ci.yml index ac455b2..185caef 100644 --- a/vsts-ci.yml +++ b/vsts-ci.yml @@ -3,6 +3,8 @@ variables: BuildConfiguration: Release + SignType: test + TeamName: vssetup trigger: batch: true @@ -23,6 +25,13 @@ steps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. +- task: MicroBuildSigningPlugin@4 + inputs: + signType: '$(SignType)' + feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' + env: + TeamName: '$(TeamName)' + - task: UseDotNet@2 displayName: 'Install .NET Core SDK' inputs: From 69ee12946c53e36d682c9807aee520422fc8acab Mon Sep 17 00:00:00 2001 From: Skylar Date: Wed, 22 Feb 2023 16:27:18 -0800 Subject: [PATCH 4/6] Revert non-publish related changes --- Directory.Build.props | 18 ------------------ VSConfigFinder/VSConfigFinder.csproj | 10 ---------- vsts-ci.yml | 9 --------- 3 files changed, 37 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index dbc3b3b..84068b4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,22 +6,4 @@ 3.5.119 - - - - - true - - - - - - - \ No newline at end of file diff --git a/VSConfigFinder/VSConfigFinder.csproj b/VSConfigFinder/VSConfigFinder.csproj index 83e858a..116d6e9 100644 --- a/VSConfigFinder/VSConfigFinder.csproj +++ b/VSConfigFinder/VSConfigFinder.csproj @@ -18,16 +18,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - - Microsoft400 - StrongName - - - Microsoft400 - - diff --git a/vsts-ci.yml b/vsts-ci.yml index 185caef..ac455b2 100644 --- a/vsts-ci.yml +++ b/vsts-ci.yml @@ -3,8 +3,6 @@ variables: BuildConfiguration: Release - SignType: test - TeamName: vssetup trigger: batch: true @@ -25,13 +23,6 @@ steps: - checkout: self fetchDepth: 0 # avoid shallow clone so nbgv can do its work. -- task: MicroBuildSigningPlugin@4 - inputs: - signType: '$(SignType)' - feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' - env: - TeamName: '$(TeamName)' - - task: UseDotNet@2 displayName: 'Install .NET Core SDK' inputs: From a6ae5b4e7bbaea0bde07046db897e4e18b0dd0b4 Mon Sep 17 00:00:00 2001 From: Skylar Date: Wed, 22 Feb 2023 17:03:19 -0800 Subject: [PATCH 5/6] Add publish step --- vsts-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vsts-ci.yml b/vsts-ci.yml index ac455b2..b2869ff 100644 --- a/vsts-ci.yml +++ b/vsts-ci.yml @@ -42,6 +42,12 @@ steps: projects: 'VSConfigFinder.Test' arguments: '--configuration $(BuildConfiguration)' +- task: DotNetCoreCLI@2 + displayName: Publish + inputs: + command: 'publish' + arguments: '--no-build --configuration $(BuildConfiguration)' + - task: CopyFiles@2 displayName: 'Copy build artifacts from: $(Build.SourcesDirectory)\VSConfigFinder\bin\$(BuildConfiguration)\** to $(Build.ArtifactStagingDirectory)\out' inputs: From 94aa8b4fbb17882e384cc0ecfda02f40707ca3b4 Mon Sep 17 00:00:00 2001 From: Skylar Date: Wed, 22 Feb 2023 17:04:04 -0800 Subject: [PATCH 6/6] Update actions as well --- .github/workflows/actions-pr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions-pr.yml b/.github/workflows/actions-pr.yml index 2a9ada3..047c3ba 100644 --- a/.github/workflows/actions-pr.yml +++ b/.github/workflows/actions-pr.yml @@ -37,4 +37,7 @@ jobs: run: dotnet build --no-restore --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.PROJECT_PATH }} - name: Test - run: dotnet test --verbosity normal --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.TEST_PROJECT_PATH }} \ No newline at end of file + run: dotnet test --verbosity normal --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.TEST_PROJECT_PATH }} + + - name: Publish + run: dotnet publish --no-build --configuration ${{ env.BUILD_CONFIGURATION }} ${{ env.TEST_PROJECT_PATH }} \ No newline at end of file