diff --git a/.github/workflows/dotnet-integration.yml b/.github/workflows/dotnet-integration.yml new file mode 100644 index 0000000..39424db --- /dev/null +++ b/.github/workflows/dotnet-integration.yml @@ -0,0 +1,39 @@ +name: .NET + +on: + workflow_dispatch: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # depth is needed for nbgv + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: | + 6.0.x + 8.0.x + include-prerelease: true + + - uses: dotnet/nbgv@master + with: + setAllVars: true + + - name: Restore dependencies + run: dotnet restore Dapper.AOT.sln + + - name: Build + run: dotnet build Dapper.AOT.sln --no-restore -c Release + + - name: Integration Tests + run: dotnet test test/Dapper.AOT.Test.Integration/Dapper.AOT.Test.Integration.csproj --no-build --verbosity normal -c Release \ No newline at end of file diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 0832b73..a45009a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,46 +10,43 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: windows-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # depth is needed for nbgv - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: | - 6.0.x - 8.0.x - include-prerelease: true - - - uses: dotnet/nbgv@master - with: - setAllVars: true - - - name: Restore dependencies - run: dotnet restore Dapper.AOT.sln - - - name: Purge - run: del src/Dapper.*/bin/Release/Dapper.*.nupkg - - - name: Build - run: dotnet build Dapper.AOT.sln --no-restore -c Release - - - name: Test - run: dotnet test test/Dapper.AOT.Test/Dapper.AOT.Test.csproj --no-build --verbosity normal -c Release -f net6.0 --filter FullyQualifiedName!~Integration - - - name: Integration Tests - run: dotnet test test/Dapper.AOT.Test.Integration/Dapper.AOT.Test.Integration.csproj --no-build --verbosity normal -c Release - - - name: Pack - if: ${{ success() && !github.base_ref }} - run: dotnet pack src/Dapper.AOT/Dapper.AOT.csproj --no-build --verbosity normal -c Release - - - name: Push to MyGet - if: ${{ success() && !github.base_ref }} - run: dotnet nuget push src/Dapper.*/bin/Release/Dapper.*.nupkg --source https://www.myget.org/F/dapper/api/v2/package --api-key "$env:MYGETAPIKEY" - env: - MYGETAPIKEY: ${{ secrets.MYGETAPIKEY }} + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # depth is needed for nbgv + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: | + 6.0.x + 8.0.x + include-prerelease: true + + - uses: dotnet/nbgv@master + with: + setAllVars: true + + - name: Restore dependencies + run: dotnet restore Build.csproj + + - name: Purge + run: del src/Dapper.*/bin/Release/Dapper.*.nupkg + + - name: Build + run: dotnet build Build.csproj --no-restore -c Release + + - name: Test + run: dotnet test Build.csproj --no-build --verbosity normal -c Release -f net6.0 --filter FullyQualifiedName!~Integration + + - name: Pack + if: ${{ success() && !github.base_ref }} + run: dotnet pack src/Dapper.AOT/Dapper.AOT.csproj --no-build --verbosity normal -c Release + + - name: Push to MyGet + if: ${{ success() && !github.base_ref }} + run: dotnet nuget push src/Dapper.*/bin/Release/Dapper.*.nupkg --source https://www.myget.org/F/dapper/api/v2/package --api-key "$env:MYGETAPIKEY" + env: + MYGETAPIKEY: ${{ secrets.MYGETAPIKEY }} \ No newline at end of file diff --git a/Dapper.AOT.sln b/Dapper.AOT.sln index 12dc26d..0942f68 100644 --- a/Dapper.AOT.sln +++ b/Dapper.AOT.sln @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props .github\workflows\dotnet.yml = .github\workflows\dotnet.yml + .github\workflows\dotnet-integration.yml = .github\workflows\dotnet-integration.yml global.json = global.json nuget.config = nuget.config README.md = README.md