diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 51518a4..e49844c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,6 +13,7 @@ env:
MAIN_PYTHON_VERSION: "3.10"
PACKAGE_NAME: "ansys.api.additive"
DEFINITION_VERSION: "v0"
+ DOTNET_VERSION: "6.0.x"
jobs:
build:
@@ -57,21 +58,34 @@ jobs:
path: dist/
retention-days: 7
+ nuget:
+ name: Build nuget package
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
- name: Setup dotnet
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
- dotnet-version: 6.0.x
+ dotnet-version: ${{ env.DOTNET_VERSION }}
+ # Publish
- name: Build 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-internal/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 pack csharp/Ansys.Api.Additive.csproj -c Release -o nuget_package -p:Version=${version}
+ - name: Upload package artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: ansys-api-additive-packages
+ path: nuget_package/
+ retention-days: 7
release:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
- needs: [build]
+ needs: [build, nuget]
runs-on: ubuntu-latest
steps:
- name: Set up Python
@@ -105,6 +119,7 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload
+
- name: Release
uses: softprops/action-gh-release@v1
with:
@@ -113,24 +128,23 @@ jobs:
./**/*.whl
./**/*.tar.gz
./**/*.pdf
+ ./**/*.nupkg
- nuget:
+ publish-nuget-package:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
- name: Publish nuget package
+ needs: [nuget]
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
-
- name: Setup dotnet
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v3
with:
- dotnet-version: 6.0.x
+ dotnet-version: ${{ env.DOTNET_VERSION }}
- # Publish
- - name: Build and publish nuget package
+ - uses: actions/download-artifact@v3
+
+ - name: Display structure of downloaded files
+ run: ls -R
+
+ - name: 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-internal/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
+ dotnet nuget push ./**/*.nupkg --source github
diff --git a/ansys/api/additive/VERSION b/ansys/api/additive/VERSION
index e2cac26..b966e81 100644
--- a/ansys/api/additive/VERSION
+++ b/ansys/api/additive/VERSION
@@ -1 +1 @@
-1.2.3
\ No newline at end of file
+1.2.4
\ No newline at end of file
diff --git a/csharp/Ansys.Api.Additive.csproj b/csharp/Ansys.Api.Additive.csproj
index 87b5b47..5794c5a 100644
--- a/csharp/Ansys.Api.Additive.csproj
+++ b/csharp/Ansys.Api.Additive.csproj
@@ -5,6 +5,7 @@
Ansys.Api.Additive
Additive Developers
Ansys Inc.
+ (c) 2023, Ansys Inc.
Protobuf definitions for Additive API
https://github.com/ansys/ansys-api-additive