Skip to content

Commit da5aa21

Browse files
committed
Update publish.yml
the publish file was broken...
1 parent d277ffa commit da5aa21

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
runs-on: ubuntu-latest
3333
outputs:
3434
version: ${{ steps.set-version.outputs.version }}
35+
env:
36+
VERSION: ${{ steps.set-version.outputs.version }}
37+
PROJECT_NAME: ${{ github.event.repository.name }}
3538
steps:
3639
- name: Checkout code
3740
uses: actions/checkout@v3
@@ -54,13 +57,13 @@ jobs:
5457
echo "Using version: $VERSION"
5558
echo "version=$VERSION" >> $GITHUB_OUTPUT
5659
57-
- name: Pack NuGet packages
60+
- name: Pack NuGet package
5861
run: |
59-
VERSION=${{ steps.set-version.outputs.version }}
60-
dotnet pack src/${{ github.event.repository.name }}.csproj \
62+
echo "Packing $PROJECT_NAME version $VERSION"
63+
dotnet pack "src/${PROJECT_NAME}.csproj" \
6164
--configuration Release \
62-
--no-build \
63-
-p:PackageVersion=$VERSION \
65+
--no-build \
66+
-p:PackageVersion="$VERSION" \
6467
-p:IncludeSymbols=true \
6568
-p:SymbolPackageFormat=snupkg
6669
@@ -69,18 +72,20 @@ jobs:
6972

7073
- name: Push NuGet packages
7174
run: |
72-
for pkg in $(find src/bin/Release -name "*.nupkg" ! -name "*.symbols.nupkg" ! -name "*.snupkg"); do
75+
echo "Pushing nupkg files..."
76+
find src/bin/Release -name "*.nupkg" ! -name "*.symbols.nupkg" ! -name "*.snupkg" -print0 | while IFS= read -r -d '' pkg; do
7377
echo "Pushing main package: $pkg"
7478
dotnet nuget push "$pkg" \
7579
--api-key "${{ secrets.NUGET_API_KEY }}" \
7680
--source https://api.nuget.org/v3/index.json \
7781
--skip-duplicate
7882
done
7983
80-
for symbols in $(find src/bin/Release -name "*.snupkg"); do
84+
echo "Pushing symbol packages..."
85+
find src/bin/Release -name "*.snupkg" -print0 | while IFS= read -r -d '' symbols; do
8186
echo "Pushing symbol package: $symbols"
8287
dotnet nuget push "$symbols" \
8388
--api-key "${{ secrets.NUGET_API_KEY }}" \
8489
--source https://api.nuget.org/v3/index.json \
8590
--skip-duplicate
86-
done
91+
done

0 commit comments

Comments
 (0)