diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..384753d6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Corral Release + +on: + release: + types: [published] + +env: + SOLUTION: source/Corral.sln + +jobs: + job0: + name: Corral Release + runs-on: ubuntu-20.04 + steps: + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '5.0.x' + - name: Checkout Corral + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Build Corral, package Corral + run: | + # Find version from tag info + VERSION="${GITHUB_REF##*/v}" + echo VERSION=$VERSION + # Change directory to Corral root folder + cd $GITHUB_WORKSPACE + # Restore dotnet tools + dotnet tool restore + # Build Corral + dotnet build -c Release ${SOLUTION} + # Create packages + dotnet pack -p:PackageVersion=$VERSION --no-build -c Release ${SOLUTION} + - name: Deploy to nuget + run: + dotnet nuget push "source/Corral/bin/Release/Corral*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 41e238bb..d8a162d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,8 +3,8 @@ name: Corral CI on: workflow_dispatch: push: - tags: - - 'v*' + branches: + - master pull_request: branches: - master @@ -41,12 +41,6 @@ jobs: dotnet tool restore # Build Corral dotnet build -c ${{ matrix.configuration }} ${SOLUTION} - # Create packages - dotnet pack --no-build -c ${{ matrix.configuration }} ${SOLUTION} # Run regression tests export CONFIGURATION=${{ matrix.configuration }} (cd test/regression && perl check.pl) - - name: Deploy to nuget - if: matrix.configuration == 'Release' && startsWith(github.ref, 'refs/tags/v') - run: | - dotnet nuget push "source/Corral/bin/${{ matrix.configuration }}/Corral*.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json diff --git a/README.md b/README.md index 3029bcb2..d978cc44 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![License][license-badge]](LICENSE.txt) [![NuGet package][nuget-badge]][nuget] +[![Corral CI](https://github.com/boogie-org/corral/actions/workflows/test.yml/badge.svg)](https://github.com/boogie-org/corral/actions/workflows/test.yml) Corral is a solver for the reachability modulo theories problem. Learn more diff --git a/source/Directory.Build.props b/source/Directory.Build.props index 878dcd15..f16cfa8d 100644 --- a/source/Directory.Build.props +++ b/source/Directory.Build.props @@ -2,7 +2,6 @@ - 1.1.4 net5.0 false Corral