fix RtpPacket and RtcpPacket bitmask setter logic (#209) #19
This file contains 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: master | |
on: | |
push: | |
branches: [master] | |
jobs: | |
ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
- name: Install .NET dependencies | |
run: dotnet restore | |
- name: Install libpcap | |
run: sudo -E bash Scripts/install-libpcap.sh | |
- name: Build | |
run: dotnet build PacketDotNet/PacketDotNet.csproj -c Release -f "net7.0" | |
- name: Test | |
run: dotnet test -c Release -f "net7.0" | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
buildprops: | |
- 'Directory.Build.props' | |
- name: Update version | |
if: steps.changes.outputs.buildprops == 'false' | |
run: | | |
(Get-Content Directory.Build.props) | % { | |
$m = [regex]::match($_, '<Version>(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?</Version>'); | |
if(!$m.Success -or $m.Groups[4].Success -or $m.Groups[5].Success) { $_; } | |
else { $_ -replace $m.Value, ("<Version>{0}.{1}.{2}-pre${{ github.run_number }}</Version>" -f $m.Groups[1].Value,$m.Groups[2].Value,([convert]::ToInt32($m.Groups[3].Value)+1)); } | |
} | Set-Content Directory.Build.props | |
- name: Clear NuGet cache | |
run: dotnet nuget locals all --clear | |
- name: Install .NET dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build -c Release | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PacketDotNet | |
path: | | |
PacketDotNet/bin/Release/net* | |
- name: Publish to NuGet | |
run: nuget push **\*.nupkg -SkipDuplicate -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} |