Repository navigation
Add centralized MessagePack serializer with assembly version tolerance #15
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: Build, Test & Publish | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: [ 'v*.*.*' ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| sqlserver: | |
| image: mcr.microsoft.com/mssql/server:2022-latest | |
| env: | |
| ACCEPT_EULA: Y | |
| MSSQL_SA_PASSWORD: CoreSync_Test123! | |
| ports: | |
| - 1433:1433 | |
| options: >- | |
| --health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P CoreSync_Test123! -C -Q 'SELECT 1'" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: coresync | |
| POSTGRES_PASSWORD: test123 | |
| POSTGRES_DB: coresync_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U coresync" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| CORE-SYNC_CONNECTION_STRING: "Server=localhost;User Id=sa;Password=CoreSync_Test123!;TrustServerCertificate=True" | |
| CORE-SYNC_POSTGRESQL_CONNECTION_STRING: "Host=localhost;Port=5432;Database=coresync_test;Username=coresync;Password=test123" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore src/CoreSync.sln | |
| - name: Build | |
| run: dotnet build src/CoreSync.sln --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test src/CoreSync.sln --configuration Release --no-restore --no-build --verbosity normal | |
| publish: | |
| needs: build-and-test | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Restore dependencies | |
| run: dotnet restore src/CoreSync.sln | |
| - name: Build and pack | |
| run: dotnet build src/CoreSync.sln --configuration Release --no-restore -p:Version=${{ steps.version.outputs.VERSION }} | |
| - name: Push to NuGet | |
| run: dotnet nuget push "src/**/bin/Release/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate |