From fb00da616485cce97ecc70edefd119da02a2d4dc Mon Sep 17 00:00:00 2001 From: Peter Krull Date: Thu, 13 Jul 2023 15:24:03 -0600 Subject: [PATCH 1/2] Fix nuget package publish step --- .github/workflows/ci.yml | 1 + ansys/api/additive/VERSION | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e49844c..aa7d58b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,4 +147,5 @@ jobs: - 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" dotnet nuget push ./**/*.nupkg --source github diff --git a/ansys/api/additive/VERSION b/ansys/api/additive/VERSION index b966e81..3a1f10e 100644 --- a/ansys/api/additive/VERSION +++ b/ansys/api/additive/VERSION @@ -1 +1 @@ -1.2.4 \ No newline at end of file +1.2.5 \ No newline at end of file From e967494cc69c14f6d7c88bba718b65c0170ca4ff Mon Sep 17 00:00:00 2001 From: Peter Krull Date: Thu, 13 Jul 2023 15:29:18 -0600 Subject: [PATCH 2/2] Use env var for github nuget repo url --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa7d58b..f9ae8ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ env: PACKAGE_NAME: "ansys.api.additive" DEFINITION_VERSION: "v0" DOTNET_VERSION: "6.0.x" + GITHUB_NUGET_REPO: "https://nuget.pkg.github.com/ansys-internal/index.json" jobs: build: @@ -72,7 +73,7 @@ jobs: # 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" + dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "${{ env.GITHUB_NUGET_REPO }}" version=$(find . -name VERSION -exec cat "{}" \;) rm -rf nuget_package dotnet pack csharp/Ansys.Api.Additive.csproj -c Release -o nuget_package -p:Version=${version} @@ -147,5 +148,5 @@ jobs: - 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" + dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "${{ env.GITHUB_NUGET_REPO }}" dotnet nuget push ./**/*.nupkg --source github