Merge pull request #63 from deveel/update-references #187
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: Webhooks CD | |
| permissions: | |
| contents: read | |
| packages: write | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build: | |
| name: "Build and Test" | |
| strategy: | |
| matrix: | |
| include: | |
| - dotnet: '6.0.x' | |
| dotnet-framework: 'net6.0' | |
| os: ubuntu-latest | |
| - dotnet: '6.0.x' | |
| dotnet-framework: 'net6.0' | |
| os: windows-latest | |
| - dotnet: '7.0.x' | |
| dotnet-framework: 'net7.0' | |
| os: ubuntu-latest | |
| - dotnet: '7.0.x' | |
| dotnet-framework: 'net7.0' | |
| os: windows-latest | |
| - dotnet: '8.0.x' | |
| dotnet-framework: 'net8.0' | |
| os: ubuntu-latest | |
| - dotnet: '8.0.x' | |
| dotnet-framework: 'net8.0' | |
| os: windows-latest | |
| runs-on: ${{ matrix.os }} | |
| outputs: | |
| version: ${{ steps.gitversion.outputs.SemVer }} | |
| nuget-version: ${{ steps.gitversion.outputs.NuGetVersion }} | |
| assembly-version: ${{ steps.gitversion.outputs.AssemblySemVer }} | |
| file-version: ${{ steps.gitversion.outputs.AssemblySemFileVer }} | |
| informational-version: ${{ steps.gitversion.outputs.InformationalVersion }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/[email protected] | |
| with: | |
| versionSpec: '6.x' | |
| - name: Determine Version | |
| id: gitversion | |
| uses: gittools/actions/gitversion/[email protected] | |
| - name: Display GitVersion outputs | |
| run: | | |
| echo "Version: ${{ steps.gitversion.outputs.SemVer }}" | |
| echo "NuGet Version: ${{ steps.gitversion.outputs.NuGetVersion }}" | |
| echo "Assembly Version: ${{ steps.gitversion.outputs.AssemblySemVer }}" | |
| echo "File Version: ${{ steps.gitversion.outputs.AssemblySemFileVer }}" | |
| echo "Informational Version: ${{ steps.gitversion.outputs.InformationalVersion }}" | |
| - name: Setup .NET ${{ matrix.dotnot }} | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet }} | |
| - name: Restore dependencies | |
| run: dotnet restore -p:TargetFramework=${{ matrix.dotnet-framework }} | |
| - name: Build | |
| run: dotnet build --no-restore -c Release -f ${{ matrix.dotnet-framework }} | |
| env: | |
| GitVersion_SemVer: ${{ steps.gitversion.outputs.SemVer }} | |
| GitVersion_AssemblySemVer: ${{ steps.gitversion.outputs.AssemblySemVer }} | |
| GitVersion_AssemblySemFileVer: ${{ steps.gitversion.outputs.AssemblySemFileVer }} | |
| GitVersion_InformationalVersion: ${{ steps.gitversion.outputs.InformationalVersion }} | |
| GitVersion_NuGetVersion: ${{ steps.gitversion.outputs.NuGetVersion }} | |
| - name: Test (Ubuntu) | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: dotnet test --no-build --verbosity normal -c Release -f ${{ matrix.dotnet-framework }} | |
| - name: Test (Windows) | |
| if: startsWith(matrix.os, 'windows') | |
| run: dotnet test --no-build --verbosity normal -c Release -f ${{ matrix.dotnet-framework }} --filter "DB!=SQLServer" | |
| publish: | |
| needs: build | |
| name: "Publish Packages (Development)" | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' | |
| uses: ./.github/workflows/publish.yml | |
| with: | |
| publish-to-nuget: false | |
| clean: | |
| needs: publish | |
| name: "Clean Old Packages" | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' | |
| uses: ./.github/workflows/clean-packages.yml |