Skip to content

Commit 361d51a

Browse files
authored
Update readme for nuget package (#24)
1 parent e586e34 commit 361d51a

File tree

2 files changed

+40
-17
lines changed

2 files changed

+40
-17
lines changed

README.md

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
### ansys-api-additive gRPC Interface Package
22

3-
This Python package contains the auto-generated gRPC Python interface files for
4-
Additive.
3+
This package contains the gRPC interface files for the Additive
4+
service. It is published both as a python and nuget package.
55

6-
#### Installation
6+
#### Python Installation
77

8-
Provided that these wheels have been published to public PyPI, they can be
9-
installed with:
8+
Provided that these wheels have been published to public PyPI, they can be installed with:
109

1110
```
1211
pip install ansys-api-additive
1312
```
1413

15-
#### Build
14+
#### Python Build
1615

1716
To build the gRPC packages, run:
1817

@@ -21,11 +20,9 @@ pip install build
2120
python -m build
2221
```
2322

24-
This will create both the source distribution containing just the protofiles
25-
along with the wheel containing the protofiles and build Python interface
26-
files.
23+
This will create both the source distribution containing just the protofiles along with the wheel containing the protofiles and build Python interface files.
2724

28-
#### Manual Deployment
25+
#### Python Manual Deployment
2926

3027
After building the packages, manually deploy them with:
3128

@@ -36,15 +33,41 @@ twine upload dist/*
3633

3734
Note that this is automatically done through CI/CD.
3835

36+
#### Nuget Installation
37+
38+
The nuget package is called `Ansys.Api.Additive` and is published
39+
to a repository on GitHub. To access the repository, you will
40+
need to create a nuget source with your GitHub user credentials.
41+
42+
```
43+
dotnet nuget add source --username USERNAME --password GITHUB_TOKEN --store-password-in-clear-text --name ansys "https://nuget.pkg.github.com/ansys/index.json"
44+
```
45+
46+
For more information, see [GitHub Working with the NuGet registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry).
47+
48+
#### Nuget Build
49+
50+
To build the nuget package, run:
51+
52+
```
53+
dotnet pack csharp/Ansys.Api.Additive.csproj -o package
54+
```
55+
56+
#### Nuget Manual Deployment
57+
58+
Once the nuget package is built, manually deploy it with the following command. Note that this uses the same nuget source created in the Installation step.
59+
60+
```
61+
dotnet nuget push ./**/*.nupkg --source ansys
62+
```
63+
64+
Note that this is automatically done through CI/CD.
65+
3966
#### Automatic Deployment
4067

41-
This repository contains GitHub CI/CD that enables the automatic building of
42-
source and wheel packages for these gRPC Python interface files. By default,
43-
these are built on PRs, the main branch, and on tags when pushing. Artifacts
44-
are uploaded for each PR.
68+
This repository contains GitHub CI/CD that enables the automatic building of source, wheel, and nuget packages for these gRPC interface files. By default, these are built on PRs, the main branch, and on tags when pushing. Artifacts are uploaded for each PR.
4569

46-
To publicly release wheels to PyPI, ensure your branch is up-to-date and then
47-
push tags. For example, for the version ``v0.5.0``.
70+
To publicly release the packages, ensure your branch is up-to-date and then push tags. For example, for the version ``v0.5.0``.
4871

4972
```bash
5073
git tag v0.5.0

ansys/api/additive/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.0
1+
1.5.0-dev0

0 commit comments

Comments
 (0)