File tree Expand file tree Collapse file tree 5 files changed +60
-4
lines changed Expand file tree Collapse file tree 5 files changed +60
-4
lines changed Original file line number Diff line number Diff line change 1616
1717jobs :
1818 build :
19- name : Build package
19+ name : Build python package
2020 runs-on : ubuntu-latest
2121 steps :
2222 - uses : actions/checkout@v3
5757 path : dist/
5858 retention-days : 7
5959
60- Release :
60+ release :
6161 if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
6262 needs : [build]
6363 runs-on : ubuntu-latest
9090 twine upload --skip-existing ./**/*.tar.gz
9191 env :
9292 TWINE_USERNAME : PAT
93- TWINE_PASSWORD : ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
93+ TWINE_PASSWORD : ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
9494 TWINE_REPOSITORY_URL : https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload
9595
9696 - name : Release
@@ -101,3 +101,24 @@ jobs:
101101 ./**/*.whl
102102 ./**/*.tar.gz
103103 ./**/*.pdf
104+
105+ nuget :
106+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
107+ name : build, pack & publish
108+ runs-on : ubuntu-latest
109+ steps :
110+ - uses : actions/checkout@v2
111+
112+ - name : Setup dotnet
113+ uses : actions/setup-dotnet@v1
114+ with :
115+ dotnet-version : 6.0.x
116+
117+ # Publish
118+ - name : build and publish nuget package
119+ run : |
120+ dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ansys/index.json"
121+ version=$(find . -name VERSION -exec cat "{}" \;)
122+ rm -rf nuget_package
123+ dotnet pack csharp/Ansys.Api.Additive.csproj -c Release -o nuget_package -p:PackageVersion=${version}
124+ dotnet nuget push nuget_package/*.nupkg --source github
Original file line number Diff line number Diff line change 3838# autogenerated Python code
3939* pb2 * .py
4040* pb2 * .pyi
41+
42+ # Compiled code
43+ bin /
44+ obj /
Original file line number Diff line number Diff line change 1- 0.1.1
1+ 0.1.2
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+
3+ <PropertyGroup >
4+ <TargetFramework >netstandard2.0</TargetFramework >
5+ <AssemblyName >Ansys.Api.Additive</AssemblyName >
6+ <Authors >Additive Developers</Authors >
7+ <Company >Ansys Inc.</Company >
8+ <PackageDescription >Protobuf definitions for Additive API</PackageDescription >
9+ <RepositoryUrl >https://github.com/ansys/ansys-api-additive</RepositoryUrl >
10+ </PropertyGroup >
11+ <ItemGroup >
12+ <Protobuf Include =" ../ansys/**/*.proto" ProtoRoot =" .." GrpcServices =" both" />
13+ </ItemGroup >
14+ <ItemGroup >
15+ <PackageReference Include =" Google.Protobuf" Version =" 3.21.9" />
16+ <PackageReference Include =" Grpc" Version =" 2.46.5" />
17+ <PackageReference Include =" Grpc.Tools" Version =" 2.50.0" >
18+ <PrivateAssets >all</PrivateAssets >
19+ <IncludeAssets >runtime; build; native; contentfiles; analyzers</IncludeAssets >
20+ </PackageReference >
21+ </ItemGroup >
22+ </Project >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <configuration >
3+ <activePackageSource >
4+ <add key =" All" value =" (Aggregate source)" />
5+ </activePackageSource >
6+ <packageSources >
7+ <add key =" nuget.org" value =" https://api.nuget.org/v3/index.json" />
8+ </packageSources >
9+ </configuration >
You can’t perform that action at this time.
0 commit comments