From 50128f7a636472e202ff6717b62b820c8ca427c2 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Tue, 2 Mar 2021 14:07:31 +0000 Subject: [PATCH] Create Xamarin.Legacy.OpenTK Nuget Package (#28) Create a new Xamarin.Legacy.OpenTK NuGet package. This will replace `OpenTK-1.0.dll`, currently shipped with Xamarin.Android. --- .gitignore | 4 +- OpenTK.props | 5 ++ Projects/OpenTK.Android/OpenTK.Android.csproj | 24 +++++++- SignList.xml | 7 +++ azure-pipelines.yml | 57 ++++++++++++++++--- 5 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 OpenTK.props create mode 100644 SignList.xml diff --git a/.gitignore b/.gitignore index 6d257cb5..a4c8b752 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.userprefs obj -bin \ No newline at end of file +bin +*.nupkg +*.snupkg \ No newline at end of file diff --git a/OpenTK.props b/OpenTK.props new file mode 100644 index 00000000..9f20b3d1 --- /dev/null +++ b/OpenTK.props @@ -0,0 +1,5 @@ + + + <_OpenTKNugetVersion>0.0.1-alpha + + \ No newline at end of file diff --git a/Projects/OpenTK.Android/OpenTK.Android.csproj b/Projects/OpenTK.Android/OpenTK.Android.csproj index 01380712..67f01852 100644 --- a/Projects/OpenTK.Android/OpenTK.Android.csproj +++ b/Projects/OpenTK.Android/OpenTK.Android.csproj @@ -1,7 +1,8 @@ + - OpenTK1.0 + OpenTK-1.0 monoandroid11.0;net6.0-android ..\..\OpenTK.snk true @@ -52,5 +53,26 @@ + + + + false + Xamarin.Legacy.OpenTK + $(_OpenTKNugetVersion) + Xamarin.Legacy.OpenTK + Legacy OpenGL, OpenCL and OpenAL Bindings for Xamarin. (https://github.com/mono/opentk) + Legacy OpenGL, OpenCL and OpenAL Bindings for Xamarin. (https://github.com/mono/opentk) + Microsoft + Microsoft, Xamarin + © Microsoft Corporation. All rights reserved. + https://github.com/mono/opentk + https://raw.githubusercontent.com/mono/opentk/main/Documentation/License.txt + false + + $(MSBuildThisFileDirectory)..\..\ + .pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder) + \ No newline at end of file diff --git a/SignList.xml b/SignList.xml new file mode 100644 index 00000000..daa079c1 --- /dev/null +++ b/SignList.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d1c1a797..80d46164 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ trigger: branches: include: - - master + - main - refs/tags/* resources: repositories: @@ -14,12 +14,18 @@ variables: - group: Xamarin-Secrets - name: Configuration value: Release - DotNetVersion: 6.0.100-preview.1.21103.13 - DotNet.Cli.Telemetry.OptOut: true - Android.Msi: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android.11.0.200.85.msi - Android.Pkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android-11.0.200-ci.master.85.pkg - iOS.Msi: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/Microsoft.NET.Workload.iOS.14.3.100-ci.main.1079.msi - iOS.Pkg: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/notarized/Microsoft.iOS.Bundle.14.3.100-ci.main.1079.pkg + - name: DotNetVersion + value: 6.0.100-preview.1.21103.13 + - name: DotNet.Cli.Telemetry.OptOut + value: true + - name: Android.Msi + value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android.11.0.200.85.msi + - name: Android.Pkg + value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/net6/4451481/master/05bb8e0eae11ae6a73838b13cf91ee2433169dff/Microsoft.NET.Workload.Android-11.0.200-ci.master.85.pkg + - name: iOS.Msi + value: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/Microsoft.NET.Workload.iOS.14.3.100-ci.main.1079.msi + - name: iOS.Pkg + value: https://bosstoragemirror.azureedge.net/wrench/main/f01fde5cd9a7ffffcdc8d241200c35988700fa00/4449408/package/notarized/Microsoft.iOS.Bundle.14.3.100-ci.main.1079.pkg stages: - stage: Build @@ -46,5 +52,38 @@ stages: - powershell: | & dotnet build Projects\OpenTK.Android\OpenTK.Android.csproj -c Debug -bl:$(LogDirectory)\Debug.binlog & dotnet build Projects\OpenTK.Android\OpenTK.Android.csproj -c Release -bl:$(LogDirectory)\Release.binlog - displayName: build samples - errorActionPreference: stop \ No newline at end of file + displayName: build libraries + errorActionPreference: stop + - powershell: | + & dotnet pack Projects\OpenTK.Android\OpenTK.Android.csproj -c Release -bl:$(LogDirectory)\PackRelease.binlog + displayName: pack NuGet + errorActionPreference: stop + - task: CopyFiles@2 + displayName: Copy nupkg + inputs: + contents: '*.nupkg' + targetFolder: $(Build.ArtifactStagingDirectory) + - task: CopyFiles@2 + displayName: Copy SignList + inputs: + contents: 'SignList.xml' + targetFolder: $(Build.ArtifactStagingDirectory) + - task: CopyFiles@2 + displayName: Copy snupkg + inputs: + contents: '*.snupkg' + targetFolder: $(Build.ArtifactStagingDirectory) + - task: PublishBuildArtifacts@1 + displayName: upload artifacts + inputs: + artifactName: 'nuget' + pathtoPublish: $(Build.ArtifactStagingDirectory) + + - stage: Publish + dependsOn: Build + condition: eq(variables['System.TeamProject'], 'devdiv') # only sign the packages when running on Windows, and using the private server which has the certificates + jobs: + - template: sign-artifacts/jobs/v2.yml@internal-templates + parameters: + signListPath: 'SignList.xml' + condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') \ No newline at end of file