diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6ce3fb7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "6.0.x" + - name: Build with dotnet + run: dotnet build --configuration Release + - name: Test with dotnet + run: dotnet test --configuration Release + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "6.0.x" + - name: Build with dotnet + run: dotnet build --configuration Release + - name: Test with dotnet + run: dotnet test --configuration Release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e280867 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: Release to NuGet + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + package: + [ + RocksDb.Extensions, + RocksDb.Extensions.Protobuf, + RocksDb.Extensions.ProtoBufNet, + RocksDb.Extensions.System.Text.Json + ] + steps: + - uses: actions/checkout@v1 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: "6.0.x" + - name: Create NuGet Package + run: dotnet pack -c Release /p:Version=${{ github.event.release.name }} /p:PackageReleaseNotes="See https://github.com/Havret/RocksDb.Extensions/releases/tag/${{ github.event.release.tag_name }}" + - name: Archive NuGet Package + uses: actions/upload-artifact@v1 + with: + name: ${{ matrix.package }} + path: ./src/${{ matrix.package }}/bin/Release/${{ matrix.package }}.${{ github.event.release.name }}.nupkg + - name: Archive NuGet Package With Symbols + uses: actions/upload-artifact@v1 + with: + name: ${{ matrix.package }} + path: ./src/${{ matrix.package }}/bin/Release/${{ matrix.package }}.${{ github.event.release.name }}.snupkg + - name: Publish NuGet Package + run: dotnet nuget push ./src/${{ matrix.package }}/bin/Release/${{ matrix.package }}.${{ github.event.release.name }}.nupkg --api-key ${{ secrets.nuget_api_key }} --source https://api.nuget.org/v3/index.json + - name: Upload NuGet Package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./src/${{ matrix.package }}/bin/Release/${{ matrix.package }}.${{ github.event.release.name }}.nupkg + asset_name: ${{ matrix.package }}.${{ github.event.release.name }}.nupkg + asset_content_type: application/zip + - name: NuGet Package With Symbols + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./src/${{ matrix.package }}/bin/Release/${{ matrix.package }}.${{ github.event.release.name }}.snupkg + asset_name: ${{ matrix.package }}.${{ github.event.release.name }}.snupkg + asset_content_type: application/zip diff --git a/src/RocksDb.Extensions.ProtoBufNet/RocksDb.Extensions.ProtoBufNet.csproj b/src/RocksDb.Extensions.ProtoBufNet/RocksDb.Extensions.ProtoBufNet.csproj index f48b783..706a655 100644 --- a/src/RocksDb.Extensions.ProtoBufNet/RocksDb.Extensions.ProtoBufNet.csproj +++ b/src/RocksDb.Extensions.ProtoBufNet/RocksDb.Extensions.ProtoBufNet.csproj @@ -1,11 +1,28 @@ + An opinionated integration of RocksDB with .NET dependency injection system. + An opinionated integration of RocksDB with .NET dependency injection system. netstandard2.1 - enable + enable 10 + enable + https://github.com/Havret/RocksDb.Extensions + https://github.com/Havret/RocksDb.Extensions/blob/master/LICENSE + git + https://github.com/Havret/RocksDb.Extensions + true + true + true + snupkg + Havret + true + + + + diff --git a/src/RocksDb.Extensions.Protobuf/RocksDb.Extensions.Protobuf.csproj b/src/RocksDb.Extensions.Protobuf/RocksDb.Extensions.Protobuf.csproj index af4c9f9..a64984a 100644 --- a/src/RocksDb.Extensions.Protobuf/RocksDb.Extensions.Protobuf.csproj +++ b/src/RocksDb.Extensions.Protobuf/RocksDb.Extensions.Protobuf.csproj @@ -1,11 +1,28 @@ + An opinionated integration of RocksDB with .NET dependency injection system. + An opinionated integration of RocksDB with .NET dependency injection system. netstandard2.1 - enable + enable 10 + enable + https://github.com/Havret/RocksDb.Extensions + https://github.com/Havret/RocksDb.Extensions/blob/master/LICENSE + git + https://github.com/Havret/RocksDb.Extensions + true + true + true + snupkg + Havret + true - + + + + + diff --git a/src/RocksDb.Extensions.System.Text.Json/RocksDb.Extensions.System.Text.Json.csproj b/src/RocksDb.Extensions.System.Text.Json/RocksDb.Extensions.System.Text.Json.csproj index 2160973..cecdb9b 100644 --- a/src/RocksDb.Extensions.System.Text.Json/RocksDb.Extensions.System.Text.Json.csproj +++ b/src/RocksDb.Extensions.System.Text.Json/RocksDb.Extensions.System.Text.Json.csproj @@ -1,11 +1,28 @@ + An opinionated integration of RocksDB with .NET dependency injection system. + An opinionated integration of RocksDB with .NET dependency injection system. netstandard2.1 - enable + enable 10 + enable + https://github.com/Havret/RocksDb.Extensions + https://github.com/Havret/RocksDb.Extensions/blob/master/LICENSE + git + https://github.com/Havret/RocksDb.Extensions + true + true + true + snupkg + Havret + true + + + + diff --git a/src/RocksDb.Extensions/RocksDb.Extensions.csproj b/src/RocksDb.Extensions/RocksDb.Extensions.csproj index f03c84b..d2c6401 100644 --- a/src/RocksDb.Extensions/RocksDb.Extensions.csproj +++ b/src/RocksDb.Extensions/RocksDb.Extensions.csproj @@ -1,12 +1,28 @@ + An opinionated integration of RocksDB with .NET dependency injection system. + An opinionated integration of RocksDB with .NET dependency injection system. netstandard2.1 enable 10 enable + https://github.com/Havret/RocksDb.Extensions + https://github.com/Havret/RocksDb.Extensions/blob/master/LICENSE + git + https://github.com/Havret/RocksDb.Extensions + true + true + true + snupkg + Havret + true - + + + + +