Skip to content

Commit

Permalink
Fix publish_to_nuget.yml action
Browse files Browse the repository at this point in the history
  • Loading branch information
rodion-m committed Apr 18, 2023
1 parent 9aea6d9 commit 6916887
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/publish_to_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ jobs:
run: dotnet test --no-build --verbosity normal

- name: Find NuGet packages
run: echo "NUPKG_FILES=$(find . -name '*.nupkg')" >> $GITHUB_ENV
id: find_packages
run: |
nupkg_files=$(find . -name '*.nupkg')
nupkg_files="${nupkg_files//$'\n'/;}"
echo "::set-output name=nupkg_files::$nupkg_files"
- name: Push NuGet packages
run: |
IFS=';' read -ra packages <<< "$NUPKG_FILES"
IFS=';' read -ra packages <<< "${{ steps.find_packages.outputs.nupkg_files }}"
for pkg in "${packages[@]}"; do
dotnet nuget push "$pkg" --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET_API_KEY }}
done
done

0 comments on commit 6916887

Please sign in to comment.