Merge pull request #11 from enclave-networks/fix/ipv4-fragmentation-f… #37
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: FastPacket Build | |
| on: | |
| push: | |
| branches: [ develop, main ] | |
| pull_request: | |
| branches: [ develop ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v0.9.7 | |
| with: | |
| versionSpec: '5.x' | |
| - name: Determine Version | |
| id: gitversion | |
| uses: gittools/actions/gitversion/execute@v0.9.7 | |
| - name: Setup .NET 6 (SDK) | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: 6.0.x | |
| - name: Unit Tests | |
| run: dotnet test | |
| - name: Build | |
| working-directory: src/Enclave.FastPacket | |
| run: dotnet build -c Release /p:Version=${{ steps.gitversion.outputs.SemVer }} | |
| - name: Clean Generator before proper build | |
| working-directory: src/Enclave.FastPacket.Generator | |
| run: dotnet clean | |
| - name: Build Generator without Local Reference Workaround | |
| working-directory: src/Enclave.FastPacket.Generator | |
| run: dotnet build -c Release /p:Version=${{ steps.gitversion.outputs.SemVer }} /p:RemoveLocalReferenceWorkaround=true | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: generator-package | |
| path: src/Enclave.FastPacket.Generator/bin/Release/Enclave.FastPacket.Generator.${{ steps.gitversion.outputs.SemVer }}.nupkg | |
| - uses: actions/upload-artifact@v3 | |
| with: | |
| name: fastpacket-package | |
| path: src/Enclave.FastPacket/bin/Release/Enclave.FastPacket.${{ steps.gitversion.outputs.SemVer }}.nupkg | |
| - name: Push Generator | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| working-directory: src/Enclave.FastPacket.Generator/bin/Release | |
| run: | | |
| dotnet nuget push *.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json | |
| - name: Push FastPacket | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| working-directory: src/Enclave.FastPacket/bin/Release | |
| run: | | |
| dotnet nuget push *.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json | |
| - name: Create Release | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: v${{ steps.gitversion.outputs.SemVer }} | |
| release_name: Release v${{ steps.gitversion.outputs.SemVer }} | |
| body: Latest Enclave.FastPacket Release |