Skip to content

Commit 905170b

Browse files
authored
Fix nuget package publish step (#21)
* Fix nuget package publish step * Use env var for github nuget repo url
1 parent 8a660ea commit 905170b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
PACKAGE_NAME: "ansys.api.additive"
1515
DEFINITION_VERSION: "v0"
1616
DOTNET_VERSION: "6.0.x"
17+
GITHUB_NUGET_REPO: "https://nuget.pkg.github.com/ansys-internal/index.json"
1718

1819
jobs:
1920
build:
@@ -72,7 +73,7 @@ jobs:
7273
# Publish
7374
- name: Build nuget package
7475
run: |
75-
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"
76+
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "${{ env.GITHUB_NUGET_REPO }}"
7677
version=$(find . -name VERSION -exec cat "{}" \;)
7778
rm -rf nuget_package
7879
dotnet pack csharp/Ansys.Api.Additive.csproj -c Release -o nuget_package -p:Version=${version}
@@ -147,4 +148,5 @@ jobs:
147148

148149
- name: Publish nuget package
149150
run: |
151+
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "${{ env.GITHUB_NUGET_REPO }}"
150152
dotnet nuget push ./**/*.nupkg --source github

ansys/api/additive/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.4
1+
1.2.5

0 commit comments

Comments
 (0)