Skip to content

Commit 215c609

Browse files
Merge pull request #2373 from SixLabors/js/publish-config
Automatically push the build to NuGet on a tagged release
2 parents 84b261c + f60bfdf commit 215c609

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/build-and-test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ jobs:
198198

199199
- name: Feedz Publish
200200
shell: pwsh
201-
run: |
202-
dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.FEEDZ_TOKEN}} -s https://f.feedz.io/sixlabors/sixlabors/nuget/index.json
203-
dotnet nuget push .\artifacts\*.snupkg -k ${{secrets.FEEDZ_TOKEN}} -s https://f.feedz.io/sixlabors/sixlabors/symbols
204-
# TODO: If github.ref starts with 'refs/tags' then it was tag push and we can optionally push out package to nuget.org
201+
run: dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.FEEDZ_TOKEN}} -s https://f.feedz.io/sixlabors/sixlabors/nuget/index.json -ss https://f.feedz.io/sixlabors/sixlabors/symbols --skip-duplicate
202+
203+
- name: NuGet Publish
204+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
205+
shell: pwsh
206+
run: dotnet nuget push .\artifacts\*.nupkg -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json --skip-duplicate
207+

0 commit comments

Comments
 (0)