ci: remove action push nuget package to github #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish on NuGet/GPR | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
run-tests: | |
uses: JoeFwd/Bannerlord.ExpandedTemplate/.github/workflows/test.yml@main | |
secrets: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
publish-on-github: | |
name: Publish Module on NuGet/GPR | |
runs-on: ubuntu-latest | |
needs: ["run-tests"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Pack | |
run: dotnet pack --configuration Release -o "./packages" | |
shell: pwsh | |
- name: Push to NuGet | |
run: dotnet nuget push "./packages/*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://www.nuget.org --skip-duplicate | |
shell: pwsh |