name: 'Build and Publish'
on: [push, pull_request]

jobs:
  build-and-publish:
    name: 'Build and Publish'
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-dotnet@v1
      with:
          dotnet-version: 5.0.x

    - run: dotnet build --configuration Release
    - run: dotnet test --no-build --configuration Release
    - run: dotnet pack --no-build --output . --configuration Release

    - run: dotnet nuget push Argument.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate
      if: github.ref == 'refs/heads/master'

    - uses: actions/upload-artifact@v2
      with:
        path: Argument.nupkg
name: 'Build and Publish'
on: [push, pull_request]

jobs:
  build-and-publish:
    name: 'Build and Publish'
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-dotnet@v1
      with:
          dotnet-version: 5.0.x

    - run: dotnet build --configuration Release
    - run: dotnet test --no-build --configuration Release
    - run: dotnet pack --no-build --output . --configuration Release

    - run: dotnet nuget push Argument.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate
      if: github.ref == 'refs/heads/main'

    - uses: actions/upload-artifact@v2
      with:
        path: Argument.nupkg
Rename main branch to 'main'
Rename main branch to 'main'
