From eafeeccf24094e38e3722795c066ce58f21f9ffb Mon Sep 17 00:00:00 2001 From: RohitM-IN Date: Sun, 31 Dec 2023 19:19:44 +0530 Subject: [PATCH] update workflows --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ .github/workflows/nuget_publish.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/nuget_publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0047760 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Build Check + +on: + push: + branches: + - main + +jobs: + build_check: + runs-on: ubuntu-latest + + strategy: + matrix: + dotnet-version: [7.0, 8.0] + + steps: + - name: Checkout Main Repository + uses: actions/checkout@v2 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Build DbSyncKit + run: | + dotnet build -c Release diff --git a/.github/workflows/nuget_publish.yml b/.github/workflows/nuget_publish.yml new file mode 100644 index 0000000..20451cc --- /dev/null +++ b/.github/workflows/nuget_publish.yml @@ -0,0 +1,28 @@ +name: Build and Publish NuGet Package + +on: + release: + types: + - created + +jobs: + build_and_publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout Main Repository + uses: actions/checkout@v2 + with: + repository: 'DbSyncKit/DbSyncKit' + + - name: Setup .NET Core + uses: actions/setup-dotnet@v2 + with: + dotnet-version: '8.0' + + - name: Build and Publish DbSyncKit.PostgreSQL + run: | + cd DbSyncKit.PostgreSQL/src + dotnet build -c Release + dotnet pack -c Release + dotnet nuget push bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_DEPLOY }}