From 90927572f4abb6299747382e7d509503d4377577 Mon Sep 17 00:00:00 2001 From: Alan Rynne Date: Tue, 14 May 2024 23:14:38 +0200 Subject: [PATCH] Fix nuget publish by installing dotnet 8 where needed (#3415) * try with just installing net8 instead of making it the default * include packing when building sdks * remove duplication * enable windows targetting * remove duplicated package build step --- .circleci/scripts/config-template.yml | 30 ++++++++++--------- .../ConnectorAutocad2025.csproj | 1 + .../ConnectorCivil2025.csproj | 2 +- .../ConnectorRevit2025.csproj | 1 + .../RevitSharedResources2025.csproj | 1 + .../ConverterRevit2025.csproj | 1 + 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.circleci/scripts/config-template.yml b/.circleci/scripts/config-template.yml index 2a4b2a1546..3a55b3176d 100644 --- a/.circleci/scripts/config-template.yml +++ b/.circleci/scripts/config-template.yml @@ -28,7 +28,7 @@ workflows: tags: only: /^(nuget-core|nugets)\/([0-9]+)\.([0-9]+)\.([0-9]+)(?:-\w{1,10})?$/ post-steps: - - packandpublish + - publish-nugets context: nuget commands: @@ -49,20 +49,8 @@ commands: echo 'export VERSION=$(echo $VER.$WORKFLOW_NUM)' >> "$BASH_ENV" environment: WORKFLOW_NUM: << pipeline.number >> - - packandpublish: + publish-nugets: steps: - - run: - name: Build nuget packages - command: | - TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;) - NOPREFIX=$(echo $TAG | sed -e 's/^[a-zA-Z]*\///') - SEMVER=$(echo "$NOPREFIX" | sed -e 's/\/[a-zA-Z-]*//') - VER=$(echo "$SEMVER" | sed -e 's/-.*//') - VERSION=$(echo $VER.$WORKFLOW_NUM) - $HOME/.dotnet/dotnet pack All.sln -p:Version=$SEMVER -p:FileVersion=$VERSION -c Release -p:IsDesktopBuild=false - environment: - WORKFLOW_NUM: << pipeline.number >> - run: name: Push nuget packages command: $HOME/.dotnet/dotnet nuget push "**/*.nupkg" -s https://api.nuget.org/v3/index.json -k $NUGET_APIKEY -n --skip-duplicate @@ -93,6 +81,7 @@ jobs: # Each project will have individual jobs for each specific task it has to name: Install dotnet command: | curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel sts + curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0 $HOME/.dotnet/dotnet --version - run: name: Enforce formatting @@ -110,6 +99,17 @@ jobs: # Each project will have individual jobs for each specific task it has to $HOME/.dotnet/dotnet build SDK.slnf -c Release -p:IsDesktopBuild=false -p:Version=$SEMVER -p:FileVersion=$VERSION environment: WORKFLOW_NUM: << pipeline.number >> + - run: + name: Build nuget packages + command: | + TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;) + NOPREFIX=$(echo $TAG | sed -e 's/^[a-zA-Z]*\///') + SEMVER=$(echo "$NOPREFIX" | sed -e 's/\/[a-zA-Z-]*//') + VER=$(echo "$SEMVER" | sed -e 's/-.*//') + VERSION=$(echo $VER.$WORKFLOW_NUM) + $HOME/.dotnet/dotnet pack All.sln -p:Version=$SEMVER -p:FileVersion=$VERSION -c Release -p:IsDesktopBuild=false + environment: + WORKFLOW_NUM: << pipeline.number >> - run-tests: title: Core Unit Tests project: Core/Tests/Speckle.Core.Tests.Unit/Speckle.Core.Tests.Unit.csproj @@ -129,6 +129,7 @@ jobs: # Each project will have individual jobs for each specific task it has to name: Install dotnet command: | curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel sts + curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0 $HOME/.dotnet/dotnet --version - run: name: Startup the Speckle Server @@ -309,6 +310,7 @@ jobs: # Each project will have individual jobs for each specific task it has to name: Install dotnet command: | curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel sts + curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 8.0 $HOME/.dotnet/dotnet --version $HOME/.dotnet/dotnet --list-runtimes diff --git a/ConnectorAutocadCivil/ConnectorAutocad2025/ConnectorAutocad2025.csproj b/ConnectorAutocadCivil/ConnectorAutocad2025/ConnectorAutocad2025.csproj index 16d11ac2cd..3f81f9d5ac 100644 --- a/ConnectorAutocadCivil/ConnectorAutocad2025/ConnectorAutocad2025.csproj +++ b/ConnectorAutocadCivil/ConnectorAutocad2025/ConnectorAutocad2025.csproj @@ -14,6 +14,7 @@ x64 win-x64 False + true diff --git a/ConnectorAutocadCivil/ConnectorCivil2025/ConnectorCivil2025.csproj b/ConnectorAutocadCivil/ConnectorCivil2025/ConnectorCivil2025.csproj index 774d948d0e..afea5f80b2 100644 --- a/ConnectorAutocadCivil/ConnectorCivil2025/ConnectorCivil2025.csproj +++ b/ConnectorAutocadCivil/ConnectorCivil2025/ConnectorCivil2025.csproj @@ -21,7 +21,7 @@ x64 win-x64 False - + true diff --git a/ConnectorRevit/ConnectorRevit2025/ConnectorRevit2025.csproj b/ConnectorRevit/ConnectorRevit2025/ConnectorRevit2025.csproj index f6b0da8833..2976df7668 100644 --- a/ConnectorRevit/ConnectorRevit2025/ConnectorRevit2025.csproj +++ b/ConnectorRevit/ConnectorRevit2025/ConnectorRevit2025.csproj @@ -15,6 +15,7 @@ true x64 win-x64 + true diff --git a/ConnectorRevit/RevitSharedResources2025/RevitSharedResources2025.csproj b/ConnectorRevit/RevitSharedResources2025/RevitSharedResources2025.csproj index 83fcd661c9..0f714f6d48 100644 --- a/ConnectorRevit/RevitSharedResources2025/RevitSharedResources2025.csproj +++ b/ConnectorRevit/RevitSharedResources2025/RevitSharedResources2025.csproj @@ -5,6 +5,7 @@ $(DefineConstants);REVIT2025 RevitSharedResources true + true diff --git a/Objects/Converters/ConverterRevit/ConverterRevit2025/ConverterRevit2025.csproj b/Objects/Converters/ConverterRevit/ConverterRevit2025/ConverterRevit2025.csproj index 39f1650e50..daf2872ec2 100644 --- a/Objects/Converters/ConverterRevit/ConverterRevit2025/ConverterRevit2025.csproj +++ b/Objects/Converters/ConverterRevit/ConverterRevit2025/ConverterRevit2025.csproj @@ -9,6 +9,7 @@ Converter for Revit 2025 $(PackageTags) objects converter revit true + true