Skip to content

Commit 82c6007

Browse files
committed
fixed push action
1 parent 46d352b commit 82c6007

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/actions/publish-nuget-package/action.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@ runs:
4646
name: ${{ inputs.package-artifact-name }}
4747
path: ${{ inputs.working-directory }}
4848

49-
- if: ${{ inputs.nuget-feed-type == 'NuGet' }}
50-
name: 'Add NuGet source'
49+
- if: ${{ inputs.nuget-feed-server == 'NuGet' }}
50+
name: 'Publish package to NuGet'
5151
shell: bash
5252
run: |
53-
dotnet nuget add source ${{ inputs.nuget-feed-url }} --name nuget-feed
54-
working-directory: ${{ inputs.working-directory }}
53+
dotnet nuget push **/*.nupkg --source ${{ vars.NUGET_PACKAGE_FEED_URL }} --api-key ${{ secrets.NUGET_PACKAGE_FEED_API_KEY }}
54+
working-directory: ${{ runner.temp }}/${{ env.working-directory }}
5555

56-
- name: 'Publish Nuget packages'
56+
- if: ${{ inputs.nuget-feed-server == 'AzureArtifacts' }}
57+
name: 'Publish package to Azure Artifacts'
5758
shell: bash
5859
run: |
59-
dotnet nuget push **/*.nupkg --source ${{ inputs.nuget-feed-url }} --api-key ${{ inputs.nuget-feed-api-key }}
60-
working-directory: ${{ inputs.working-directory }}
60+
dotnet nuget add source ${{ vars.NUGET_PACKAGE_FEED_URL }} --name nuget-feed --username username --password ${{ secrets.NUGET_PACKAGE_FEED_API_KEY }} --store-password-in-clear-text
61+
dotnet nuget push **/*.nupkg --source nuget-feed --api-key ${{ secrets.NUGET_PACKAGE_FEED_API_KEY }} --skip-duplicate
62+
working-directory: ${{ runner.temp }}/${{ env.working-directory }}

0 commit comments

Comments
 (0)