Skip to content

Commit

Permalink
fix: rc and release nuget package workflows did not upload symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
asser-dk committed Jul 11, 2024
1 parent e295fa3 commit 8aed07e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
build_prelease_nuget_package:
name: Build and push prerelease NuGet package
runs-on: ubuntu-latest

steps:
Expand All @@ -14,16 +15,27 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity minimal

- name: Pack Fenris.OneOfContrib.Blazor
run: |
VERSION=${{ github.event.release.tag_name }}
VERSION=${VERSION#v}
dotnet pack src/Fenris.OneOfContrib.Blazor/ -c Release -o ./artifacts --include-source --verbosity minimal -p:PackageVersion=$VERSION-rc
- name: Push to nuget.org
run: dotnet nuget push ./artifacts/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_TOKEN }}
dotnet pack src/Fenris.OneOfContrib.Blazor/ -c Release -o ./artifacts --include-source --verbosity minimal -p:PackageVersion=$VERSION-rc.${{ github.run_number }}
- name: Push implementation package
run: |
dotnet nuget push ./artifacts/*.nupkg \
--source "https://api.nuget.org/v3/index.json" \
--api-key ${{ secrets.NUGET_TOKEN }}
- name: Push symbols package
run: |
dotnet nuget push ./artifacts/*.snupkg \
--source "https://www.nuget.org/api/v2/symbolpackage" \
--api-key ${{ secrets.NUGET_TOKEN }}
18 changes: 15 additions & 3 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
build_release_nuget_package:
name: Build and push NuGet package
runs-on: ubuntu-latest

steps:
Expand All @@ -14,16 +15,27 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity minimal

- name: Pack Fenris.OneOfContrib.Blazor
run: |
VERSION=${{ github.event.release.tag_name }}
VERSION=${VERSION#v}
dotnet pack src/Fenris.OneOfContrib.Blazor/ -c Release -o ./artifacts --include-source --verbosity minimal -p:PackageVersion=$VERSION
- name: Push to nuget.org
run: dotnet nuget push ./artifacts/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_TOKEN }}
dotnet pack src/Fenris.OneOfContrib.Blazor/ -c Release -o ./artifacts --verbosity minimal -p:PackageVersion=$VERSION
- name: Push implementation package
run: |
dotnet nuget push ./artifacts/*.nupkg \
--source "https://api.nuget.org/v3/index.json" \
--api-key ${{ secrets.NUGET_TOKEN }}
- name: Push symbols package
run: |
dotnet nuget push ./artifacts/*.snupkg \
--source "https://www.nuget.org/api/v2/symbolpackage" \
--api-key ${{ secrets.NUGET_TOKEN }}

0 comments on commit 8aed07e

Please sign in to comment.