Skip to content

Commit

Permalink
Tweak the build
Browse files Browse the repository at this point in the history
This requests GA .NET SDKs only (so no previews), and passes
`--skip-duplicate` on the NuGet push, to make it easier to rerun the
build for a tag if something goes wrong during publishing.
  • Loading branch information
Zastai committed Jan 4, 2025
1 parent 63ef1ce commit 28b8630
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build

on:
push:
Expand Down Expand Up @@ -27,6 +27,7 @@ jobs:
id: setup
with:
dotnet-version: ${{env.dotnet-version}}
dotnet-quality: ga
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Create global.json to force use of .NET SDK ${{steps.setup.outputs.dotnet-version}}
Expand All @@ -46,7 +47,7 @@ jobs:
path: "output/package/${{matrix.configuration}}/*.*nupkg"
- name: Publish (NuGet - GitHub Packages)
if: matrix.configuration == 'Release' && startsWith(github.ref, 'refs/tags/v')
run: "dotnet nuget push output/package/${{matrix.configuration}}/*.nupkg -s https://nuget.pkg.github.com/zastai/index.json -k ${{secrets.GITHUB_TOKEN}}"
run: "dotnet nuget push output/package/${{matrix.configuration}}/*.nupkg --skip-duplicate -s https://nuget.pkg.github.com/zastai/index.json -k ${{secrets.GITHUB_TOKEN}}"
- name: Publish (NuGet - nuget.org)
if: matrix.configuration == 'Release' && startsWith(github.ref, 'refs/tags/v')
run: "dotnet nuget push output/package/${{matrix.configuration}}/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}"
run: "dotnet nuget push output/package/${{matrix.configuration}}/*.nupkg --skip-duplicate -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}}"

0 comments on commit 28b8630

Please sign in to comment.