Feature/implement data related logic for ranges #31
Workflow file for this run
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
| name: CI/CD - Domain.Abstractions | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| paths: | |
| - 'src/Domain/Intervals.NET.Domain.Abstractions/**' | |
| - '.github/workflows/domain-abstractions.yml' | |
| pull_request: | |
| branches: [ master, main ] | |
| paths: | |
| - 'src/Domain/Intervals.NET.Domain.Abstractions/**' | |
| - '.github/workflows/domain-abstractions.yml' | |
| workflow_dispatch: | |
| env: | |
| DOTNET_VERSION: '8.x.x' | |
| PROJECT_PATH: 'src/Domain/Intervals.NET.Domain.Abstractions/Intervals.NET.Domain.Abstractions.csproj' | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore dependencies | |
| run: dotnet restore ${{ env.PROJECT_PATH }} | |
| - name: Build Domain.Abstractions | |
| run: dotnet build ${{ env.PROJECT_PATH }} --configuration Release --no-restore | |
| publish-nuget: | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore dependencies | |
| run: dotnet restore ${{ env.PROJECT_PATH }} | |
| - name: Build Domain.Abstractions | |
| run: dotnet build ${{ env.PROJECT_PATH }} --configuration Release --no-restore | |
| - name: Pack Domain.Abstractions | |
| run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --no-build --output ./artifacts | |
| - name: Publish Domain.Abstractions to NuGet | |
| run: dotnet nuget push ./artifacts/Intervals.NET.Domain.Abstractions.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| - name: Upload package artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: domain-abstractions-package | |
| path: ./artifacts/*.nupkg |