Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:

jobs:
build:
name: Build package
name: Build python package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
path: dist/
retention-days: 7

Release:
release:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [build]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
twine upload --skip-existing ./**/*.tar.gz
env:
TWINE_USERNAME: PAT
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload

- name: Release
Expand All @@ -101,3 +101,24 @@ jobs:
./**/*.whl
./**/*.tar.gz
./**/*.pdf

nuget:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

# Publish
- name: build and publish nuget package
run: |
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"
version=$(find . -name VERSION -exec cat "{}" \;)
rm -rf nuget_package
dotnet pack csharp/Ansys.Api.Additive.csproj -c Release -o nuget_package -p:PackageVersion=${version}
dotnet nuget push nuget_package/*.nupkg --source github
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ venv/
# autogenerated Python code
*pb2*.py
*pb2*.pyi

# Compiled code
bin/
obj/
2 changes: 1 addition & 1 deletion ansys/api/additive/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1
0.1.2
22 changes: 22 additions & 0 deletions csharp/Ansys.Api.Additive.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Ansys.Api.Additive</AssemblyName>
<Authors>Additive Developers</Authors>
<Company>Ansys Inc.</Company>
<PackageDescription>Protobuf definitions for Additive API</PackageDescription>
<RepositoryUrl>https://github.com/ansys/ansys-api-additive</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="../ansys/**/*.proto" ProtoRoot=".." GrpcServices="both" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.21.9" />
<PackageReference Include="Grpc" Version="2.46.5" />
<PackageReference Include="Grpc.Tools" Version="2.50.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>
9 changes: 9 additions & 0 deletions csharp/nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>