Fix paths #198
This file contains hidden or 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
| # This workflow will build a .NET project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
| name: .NET | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| inputs: | |
| publish-packages: | |
| description: Publish packages? | |
| type: boolean | |
| required: true | |
| default: false | |
| jobs: | |
| pipeline: | |
| environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Pull Requests' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Cache NuGet | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
| - name: Run Pipeline | |
| run: dotnet run -c Release | |
| working-directory: "Sourcy.Pipeline" | |
| env: | |
| NuGet__ApiKey: ${{ github.ref == 'refs/heads/main' && secrets.NUGET__APIKEY || null }} | |
| NuGet__ShouldPublish: ${{ github.event.inputs.publish-packages || false }} |