Skip to content

Commit 3ed2b1e

Browse files
committed
update publish workflow to publish to official nuget as well
1 parent 9198829 commit 3ed2b1e

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,15 @@ jobs:
104104
- name: Pack `Physics.Systems`
105105
run: dotnet pack "${{ github.event.repository.name }}/source" /p:Version=${VERSION} --no-build --output .
106106

107-
- name: Add NuGet Source
107+
- name: Add GitHub source
108108
run: dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text
109109

110-
- name: Publish `Physics.Systems`
111-
run: dotnet nuget push SimulationTree.Physics.Systems.${VERSION}.nupkg --source github --api-key ${NUGET_TOKEN}
110+
- name: Publish `Physics.Systems` to GitHub registry
111+
run: dotnet nuget push SimulationTree.Physics.Systems.${VERSION}.nupkg --source github --api-key ${API_KEY}
112112
env:
113-
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
113+
API_KEY: ${{ secrets.NUGET_TOKEN_GITHUB }}
114+
115+
- name: Publish `Physics.Systems` to official registry
116+
run: dotnet nuget push SimulationTree.Physics.Systems.${VERSION}.nupkg --source nuget.org --api-key ${API_KEY}
117+
env:
118+
API_KEY: ${{ secrets.NUGET_TOKEN_OFFICIAL }}

0 commit comments

Comments
 (0)