Add shared node types for Enum, Guid, Float, Double, Decimal, and rel… #30
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 Pipeline | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - '*.sln' | |
| - '**/*.csproj' | |
| pull_request: | |
| branches: [ master, main ] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - '*.sln' | |
| - '**/*.csproj' | |
| env: | |
| DOTNET_VERSION: '9.x.x' | |
| PROJECT_PATH: 'src/StringEnricher/StringEnricher.csproj' | |
| TEST_PATH: 'tests/StringEnricher.Tests/StringEnricher.Tests.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 | |
| - name: Build solution | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Run tests | |
| run: dotnet test ${{ env.TEST_PATH }} --configuration Release --no-build --verbosity normal | |
| publish-nuget: | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| if: github.ref == 'refs/heads/master' || 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 | |
| - name: Build project | |
| run: dotnet build ${{ env.PROJECT_PATH }} --configuration Release --no-restore | |
| - name: Create NuGet package | |
| run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --no-build --output ./artifacts | |
| - name: Publish to NuGet | |
| run: dotnet nuget push ./artifacts/*.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: nuget-packages | |
| path: ./artifacts/*.nupkg |