Skip to content

Commit d8a4997

Browse files
authored
Fix NuGet pack and push
1 parent b9e5d26 commit d8a4997

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: dotnet test --configuration ${{ env.CONFIGURATION }} --no-build --verbosity normal --filter "TestCategory=AppVeyor"
3636

3737
- name: Pack NuGet packages
38-
run: dotnet pack --configuration ${{ env.CONFIGURATION }} --no-build --output ./artifacts
38+
run: dotnet pack src/AdysTech.CredentialManager/AdysTech.CredentialManager.csproj --configuration ${{ env.CONFIGURATION }} --no-build --output ./artifacts
3939

4040
- name: Upload artifacts
4141
uses: actions/upload-artifact@v4
@@ -51,6 +51,11 @@ jobs:
5151

5252
- name: Publish to NuGet
5353
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
54-
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
54+
shell: pwsh
55+
run: |
56+
$packages = Get-ChildItem -Path ./artifacts -Filter *.nupkg
57+
foreach ($package in $packages) {
58+
dotnet nuget push $package.FullName --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
59+
}
5560
env:
5661
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)