Skip to content

Commit 6bde762

Browse files
authored
Set up Nuget deploy pipeline (#6)
* Add NuGet packaging for PythonNet3 engine Introduced a nuspec file and nuget.config for packaging DynamoVisualProgramming.PythonEngine.PythonNet3. Updated pipeline.yml to support NuGet deployment using a secret API key and new configuration files. * update * Update pipeline.yml * Update README.md * update version * Update README.md * Update package versioning and add logo to nuspec Refactored versioning in Directory.Build.props to use MS_PACKAGE_VERSION and updated DynamoPackageVersion. Modified nuspec to use a variable for version and include logo.png in the package. Added logo.png to the repository. * Update Jenkinsfile * Update pipeline.yml * Update update
1 parent 27aadd6 commit 6bde762

File tree

6 files changed

+52
-9
lines changed

6 files changed

+52
-9
lines changed

Directory.Build.props

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@
44
<Owners>$(Company)</Owners>
55
<Authors>Dynamo</Authors>
66
<Product>Dynamo</Product>
7-
<Copyright>Copyright © Autodesk, Inc 2024</Copyright>
8-
7+
<Copyright>Copyright © Autodesk, Inc 2025</Copyright>
8+
99
<TargetFramework>net10.0</TargetFramework>
1010
<ImplicitUsings>enable</ImplicitUsings>
1111
<Nullable>enable</Nullable>
1212

13-
<!-- Using `VersionPrefix` allows specifying a `version-suffix` argument when packing for beta releases. -->
14-
<VersionPrefix>1.4.0</VersionPrefix>
15-
<DynamoPackageVersion>4.0.0-beta2860</DynamoPackageVersion>
13+
<!-- This is the version used for created NuGet packages. Using `VersionPrefix` allows specifying a `version-suffix` argument when packing for beta releases. -->
14+
<MS_PACKAGE_VERSION Condition="'$(MS_PACKAGE_VERSION)' == ''">0.0.0.0</MS_PACKAGE_VERSION>
15+
<VersionPrefix>$(MS_PACKAGE_VERSION)</VersionPrefix>
16+
<DynamoPackageVersion>4.0.0.3277</DynamoPackageVersion>
1617
<DynamoVersion>4.0</DynamoVersion>
17-
18+
1819
<!--Aids in code analysis.-->
1920
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2021
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
2122
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
2223
<BuildOutput>$(SolutionDir)\package_output\DSPythonNet3\</BuildOutput>
23-
</PropertyGroup>
24-
</Project>
24+
</PropertyGroup>
25+
</Project>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3+
<metadata>
4+
<id>DynamoVisualProgramming.PythonEngine.PythonNet3</id>
5+
<version>$version$</version>
6+
<authors>Autodesk</authors>
7+
<owners>Autodesk</owners>
8+
<license type="expression">Apache-2.0</license>
9+
<projectUrl>https://github.com/DynamoDS/PythonNet3Engine</projectUrl>
10+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11+
<description>PythonNet3 Engine Nuget, it contains the necessary binaries to load the PythonNet3 engine to Dynamo</description>
12+
<copyright>Copyright Autodesk 2025</copyright>
13+
</metadata>
14+
<files>
15+
<file src="logo.png" target="content\logo\" />
16+
<file src="package_output\DSPythonNet3\pkg.json" target="content\manifest\" />
17+
<file src="package_output\DSPythonNet3\bin\**" target="lib\net10.0\" exclude="**\*.pdb;" />
18+
<file src="package_output\DSPythonNet3\extra\**" target="lib\net10.0\" exclude="**\*.pdb;" />
19+
</files>
20+
</package>

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Builds are published to [Jenkins](https://master-5.jenkins.autodesk.com/job/Dyna
99
## Deployment
1010

1111
The repository uses the release branch to deploy to [Dynamo Package Manager](www.dynamopackages.com).
12+
As well as to public Nuget: https://www.nuget.org/packages/DynamoVisualProgramming.PythonEngine.PythonNet3
13+
(Make sure to update the binary version in Directory.build.props before releasing and match it to the version that will be deployed after release)
1214

1315
The package `PythonNet3 Engine` is a dynamo package that is consumed by dynamo users using the Package Manager. The following explains the deployment process to continously push updates to that package.
1416

logo.png

2.56 KB
Loading

nuget.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="Public Nuget" value="https://api.nuget.org/v3/index.json" />
5+
</packageSources>
6+
</configuration>

pipeline.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
version: 1.4.6
22
pipeline_os: windows
3-
create_pr_release_to_master: true
3+
create_pr_release_to_public_master: true
44

55
env:
66
- GITHUB_ACCESS_TOKEN_ID: github_access_token_acsbuildguy
77
- SLACK_QUANTUM_BUILD_CHANNEL : "#dynamo-jenkinsbuild"
88
- JENKINS_NODE_WIN: CDA-VS22-DT
99

10+
jenkins_creds:
11+
-
12+
type: secretText
13+
credentialsId: dynamovisualprogramming_nuget_api_key
14+
secretText: API_KEY
15+
1016
code_analysis:
1117
sonarqube:
1218
source_encoding: UTF-8
@@ -44,3 +50,11 @@ deployment:
4450
use_dev_pm: false
4551
outputs:
4652
- DSPythonNet3.zip
53+
-
54+
type: nuget
55+
custom_api_key: ${API_KEY}
56+
nuget_config_file: nuget.config
57+
nuspec_files:
58+
- DynamoVisualProgramming.PythonEngine.PythonNet3.nuspec
59+
package_version_cmd: echo %_PACKAGE_VERSION%
60+
destination_source_name: Public Nuget

0 commit comments

Comments
 (0)