diff --git a/.github/actions/build-tools/action.yml b/.github/actions/build-tools/action.yml index 921c8ad0..1dabd6dc 100644 --- a/.github/actions/build-tools/action.yml +++ b/.github/actions/build-tools/action.yml @@ -59,101 +59,15 @@ runs: 7.0.* ${{env.DOTNET_VERSION}} - - name: "List current nuget feeds (before)" - shell: bash - run: | - echo "List current nuget feeds (before)" - dotnet nuget list source - -### REMOVE FEEDS - - name: "Dotnet: Remove cache nuget feed (NugetCache) if it exists" - shell: bash - run: | - echo "Removing NugetCache NuGet Feed" - [ "$(dotnet nuget list source | grep NugetCache | tr -s ' ' | cut -d ' ' -f 3)" == "NugetCache" ] && dotnet nuget remove source NugetCache || echo "NugetCache NuGet Feed is Not Registered" - - - name: "Dotnet: Remove cache nuget feed (nuget.org) if it exists" - shell: bash - run: | - echo "Removing nuget.org NuGet Feed" - [ "$(dotnet nuget list source | grep nuget | tr -s ' ' | cut -d ' ' -f 3)" == "nuget.org" ] && dotnet nuget remove source nuget.org || echo "nuget.org NuGet Feed is Not Registered" - - - name: "Dotnet: Remove optional nuget feed (Additional1Cache) if it exists" - shell: bash - run: | - echo "Removing Additional1Cache NuGet Feed" - [ "$(dotnet nuget list source | grep Additional1Cache | tr -s ' ' | cut -d ' ' -f 3)" == "Additional1Cache" ] && dotnet nuget remove source Additional1Cache || echo "Additional1Cache NuGet Feed is Not Registered" - - - name: "Dotnet: Remove optional nuget feed (Additional2Cache) if it exists" - shell: bash - run: | - echo "Removing Additional2Cache NuGet Feed" - [ "$(dotnet nuget list source | grep Additional2Cache | tr -s ' ' | cut -d ' ' -f 3)" == "Additional2Cache" ] && dotnet nuget remove source Additional2Cache || echo "Additional2Cache NuGet Feed is Not Registered" - - - name: "Dotnet: Remove optional nuget feed (Additional1) if it exists" - shell: bash - run: | - echo "Removing Additional1 NuGet Feed" - [ "$(dotnet nuget list source | grep Additional1 | tr -s ' ' | cut -d ' ' -f 3)" == "Additional1" ] && dotnet nuget remove source Additional1 || echo "Additional1 NuGet Feed is Not Registered" - - - name: "Dotnet: Remove optional nuget feed (Additional2) if it exists" - shell: bash - run: | - echo "Removing Additional2 NuGet Feed" - [ "$(dotnet nuget list source | grep Additional2 | tr -s ' ' | cut -d ' ' -f 3)" == "Additional2" ] && dotnet nuget remove source Additional2 || echo "Additional2 NuGet Feed is Not Registered" - -#### ADD FEEDS - - name: "Dotnet: Add optional nuget feed (NugetCache)" - if: inputs.NUGET_PUBLIC_RESTORE_FEED_CACHE != '' - shell: bash - run: | - echo "Adding NugetCache NuGet feed..." - dotnet nuget add source --name NugetCache "${{inputs.NUGET_PUBLIC_RESTORE_FEED_CACHE}}" - - - name: "Dotnet: Add nuget feed (nuget.org)" - shell: bash - run: | - echo "Adding nuget.org NuGet feed..." - dotnet nuget add source --name nuget.org "${{inputs.NUGET_PUBLIC_RESTORE_FEED}}" - - - name: "Dotnet: Add optional nuget feed (Additional1Cache)" - if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE_CACHE != '' - shell: bash - run: | - echo "Adding Additional1Cache NuGet feed..." - dotnet nuget add source --name Additional1Cache "${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE_CACHE}}" - - - name: "Dotnet: Add optional nuget feed (Additional2Cache)" - if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE != '' - shell: bash - run: | - echo "Adding Additional2Cache NuGet feed..." - dotnet nuget add source --name Additional2Cache "${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE}}" - - - - name: "Dotnet: Add optional nuget feed (Additional1)" - if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE != '' - shell: bash - run: | - echo "Adding Additional1 NuGet feed..." - dotnet nuget add source --name Additional1 "${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE}}" - - - name: "Dotnet: Add optional nuget feed (Additional2)" - if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE != '' - shell: bash - run: | - echo "Adding Additional2 NuGet feed..." - dotnet nuget add source --name Additional2 "${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE}}" - - - name: "Dotnet: Show sources (After)" - shell: bash - run: | - echo "List current nuget feeds (after)" - dotnet nuget list source - - - name: "Dotnet: Clear nuget cache" - shell: bash - run: dotnet nuget locals all --clear + - name: "Configure nuget feeds" + uses: ./.github/actions/nuget + with: + NUGET_PUBLIC_RESTORE_FEED_CACHE: ${{inputs.NUGET_PUBLIC_RESTORE_FEED_CACHE}} + NUGET_PUBLIC_RESTORE_FEED: ${{inputs.NUGET_PUBLIC_RESTORE_FEED}} + NUGET_ADDITIONAL_RESTORE_FEED_RELEASE_CACHE: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE_CACHE}} + NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE}} + NUGET_ADDITIONAL_RESTORE_FEED_RELEASE: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE}} + NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE}} - name: "Enable dotnet tools" shell: bash @@ -208,3 +122,16 @@ runs: DOTNET_ReadyToRun: "0" DOTNET_TC_QuickJitForLoops: "1" DOTNET_TieredPGO: "1" + + - name: Install SQLProj + shell: bash + run: dotnet new install MSBuild.Sdk.SqlProj.Templates + env: + DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" + DOTNET_INSTALL_DIR: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" + DOTNET_MULTILEVEL_LOOKUP: "false" + DOTNET_NOLOGO: "true" + DOTNET_PRINT_TELEMETRY_MESSAGE: "false" + DOTNET_ReadyToRun: "0" + DOTNET_TC_QuickJitForLoops: "1" + DOTNET_TieredPGO: "1"