Skip to content

fix example readme

fix example readme #65

name: Pack and Push NuGet Package
on:
pull_request:
branches:
- main
types:
- closed
push:
branches:
- main
jobs:
pack-push:
env:
CAMINHO_PROJETO: ./ApiBrasil/ApiBrasil.csproj
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'refs/heads/main' || github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Setup .NET 7
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.302
- name: Geração do package
run: dotnet pack ${{ env.CAMINHO_PROJETO }} -c Release -o out
- name: Push no NuGet
run: |
cd out
dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ secrets.NUGET_SERVER }} --skip-duplicate