From a8b4deef47e4f2f9d97d3feb17d7f95831c873db Mon Sep 17 00:00:00 2001 From: Oleksandr Melnyk Date: Sun, 12 Jun 2022 13:36:19 +0300 Subject: [PATCH] Update CI --- .github/workflows/dotnet.yml | 2 ++ .github/workflows/release.yml | 25 +++++++++++++++++++++++++ nuget.props | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e334af1..5ef1650 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -3,6 +3,8 @@ name: .NET on: push: branches: [ "master" ] + pull_request: + branches: [ "master" ] jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..51877f2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release to NuGet + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + - name: Build + run: dotnet build ./src -c Release + - name: Test + run: dotnet test ./src -c Release --no-build + - name: Pack nugets + run: dotnet pack ./src/Standart.Hash.xxHash -c Release --no-build --output . + - name: Push to NuGet + run: dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json \ No newline at end of file diff --git a/nuget.props b/nuget.props index cf45135..1ac3a8c 100644 --- a/nuget.props +++ b/nuget.props @@ -3,7 +3,7 @@ net6.0 Standart.Hash.xxHash - 4.0.1 + 4.0.2 Standart.Hash.xxHash Standart.Hash.xxHash Oleksandr Melnyk