From c0e6d8c3c23ea74627473a1ff33d8df85f0bed85 Mon Sep 17 00:00:00 2001
From: Alexey <194261@mail.ru>
Date: Fri, 25 Nov 2022 15:55:51 +0300
Subject: [PATCH] Add automatic build increment
---
.../{cross-compile.yml => csharp-bindings-build.yml} | 8 +++++---
bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj | 12 ++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
rename .github/workflows/{cross-compile.yml => csharp-bindings-build.yml} (88%)
diff --git a/.github/workflows/cross-compile.yml b/.github/workflows/csharp-bindings-build.yml
similarity index 88%
rename from .github/workflows/cross-compile.yml
rename to .github/workflows/csharp-bindings-build.yml
index bef0d86..663dda5 100644
--- a/.github/workflows/cross-compile.yml
+++ b/.github/workflows/csharp-bindings-build.yml
@@ -1,4 +1,4 @@
-name: Cross Compile
+name: C# bindings test and build
on:
push:
branches:
@@ -73,10 +73,12 @@ jobs:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: cd bindings/csharp && dotnet restore
+ - name: Test
+ run: cd bindings/csharp && dotnet test --configuration Release --no-restore
- name: Build
- run: cd bindings/csharp && dotnet build --configuration Release --no-restore -o build
+ run: cd bindings/csharp && dotnet build -p:Version=0.1.1.${{github.run_number}} --configuration Release --no-restore -o build
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: Ckzg.Bindings
- path: bindings/csharp/build/Ckzg.Bindings.*.nupkg
\ No newline at end of file
+ path: bindings/csharp/build/Ckzg.Bindings.*.nupkg
diff --git a/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj b/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj
index c559a12..255ae46 100644
--- a/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj
+++ b/bindings/csharp/Ckzg.Bindings/Ckzg.Bindings.csproj
@@ -11,7 +11,7 @@