File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -93,17 +93,27 @@ steps:
93
93
- run : dotnet build <my project>
94
94
- name : Create the package
95
95
run : dotnet pack --configuration Release <my project>
96
- - name : Publish the package to GPR
96
+ - name : Publish the package to GPR
97
97
run : dotnet nuget push <my project>/bin/Release/*.nupkg
98
98
99
- # Authticates packages to push to Azure Artifacts
99
+ # Authenticates packages to push to Azure Artifacts
100
100
- uses : actions/setup-dotnet@v1
101
101
with :
102
102
source-url : https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
103
103
env :
104
104
NUGET_AUTH_TOKEN : ${{secrets.AZURE_DEVOPS_PAT}} # Note, create a secret with this name in Settings
105
105
- name : Publish the package to Azure Artifacts
106
106
run : dotnet nuget push <my project>/bin/Release/*.nupkg
107
+
108
+ # Authenticates packages to push to nuget.org.
109
+ # It's only the way to push a package to nuget.org feed for macOS/Linux machines due to API key config store limitations.
110
+ - uses : actions/setup-dotnet@v1
111
+ with :
112
+ dotnet-version : 3.1.x
113
+ - name : Publish the package to nuget.org
114
+ run : dotnet nuget push */bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
115
+ env :
116
+ NUGET_AUTH_TOKEN : ${{ secrets.NUGET_TOKEN }}
107
117
` ` `
108
118
109
119
## Environment Variables to use with dotnet
You can’t perform that action at this time.
0 commit comments