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..5832f1b --- /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.MSSQL + run: | + cd DbSyncKit.MSSQL/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 }}