Skip to content

v2.0.0-pre-006

v2.0.0-pre-006 #32

name: Publish Nuget Package
on:
release:
types: [released,prereleased]
branches: [ master,main ]
jobs:
publish-with-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.x
- name: restore dependencies
run: dotnet restore
- name: build
run: dotnet build --no-restore -c Release
- name: pack
run: dotnet pack -c Release -o ./output
- name: push package
shell: pwsh
working-directory: ./output
run: Get-ChildItem -File -Filter '*.nupkg' | ForEach-Object { dotnet nuget push $_ -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --no-service-endpoint --skip-duplicate; dotnet nuget push $_ -k ${{secrets.NUGET_GITHUB_KEY}} -s https://nuget.pkg.github.com/stratosblue/index.json --no-service-endpoint --skip-duplicate; }