From 4fe1a170d7a437c3d5d82d0d66187f329c07f075 Mon Sep 17 00:00:00 2001 From: Sindre Wilting Date: Tue, 30 Jun 2020 11:00:22 +0200 Subject: [PATCH] Uncomment in workflow again --- .github/workflows/dotnet-library.yml | 64 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/dotnet-library.yml b/.github/workflows/dotnet-library.yml index d6b5fd9..6ff6c67 100644 --- a/.github/workflows/dotnet-library.yml +++ b/.github/workflows/dotnet-library.yml @@ -28,43 +28,43 @@ jobs: run: dotnet build --configuration Release - name: Test and report coverage run: dotnet test --configuration Release --no-build /p:CollectCoverage=true /p:CoverletOutput=${{ github.workspace }}/${{ env.COVERAGE_FOLDER }}/ /p:MergeWith=${{ github.workspace }}/${{ env.COVERAGE_FOLDER }}/coverage.json /p:CoverletOutputFormat=\"opencover,json\" -m:1 - # - name: Establish context - # id: context - # uses: dolittle/establish-context-action@v2 - # with: - # prerelease-branches: ${{ env.PRERELEASE_BRANCHES }} - # - name: Increment version - # id: increment-version - # if: ${{ steps.context.outputs.should-publish == 'true' }} - # uses: dolittle/increment-version-action@v2 - # with: - # version: ${{ steps.context.outputs.current-version }} - # release-type: ${{ steps.context.outputs.release-type }} + - name: Establish context + id: context + uses: dolittle/establish-context-action@v2 + with: + prerelease-branches: ${{ env.PRERELEASE_BRANCHES }} + - name: Increment version + id: increment-version + if: ${{ steps.context.outputs.should-publish == 'true' }} + uses: dolittle/increment-version-action@v2 + with: + version: ${{ steps.context.outputs.current-version }} + release-type: ${{ steps.context.outputs.release-type }} - # - name: Create packages - # if: ${{ steps.context.outputs.should-publish == 'true' }} - # run: dotnet pack --no-build --configuration Release -o ${{ env.NUGET_OUTPUT }} /p:PackageVersion=${{ steps.increment-version.outputs.next-version }} -p:IncludeSymbols=false + - name: Create packages + if: ${{ steps.context.outputs.should-publish == 'true' }} + run: dotnet pack --no-build --configuration Release -o ${{ env.NUGET_OUTPUT }} /p:PackageVersion=${{ steps.increment-version.outputs.next-version }} -p:IncludeSymbols=false - # - name: Create GitHub Release - # uses: dolittle/github-release-action@v1 - # if: ${{ steps.context.outputs.should-publish == 'true' }} - # with: - # cascading-release: ${{ steps.context.outputs.cascading-release }} - # version: ${{ steps.increment-version.outputs.next-version }} + - name: Create GitHub Release + uses: dolittle/github-release-action@v1 + if: ${{ steps.context.outputs.should-publish == 'true' }} + with: + cascading-release: ${{ steps.context.outputs.cascading-release }} + version: ${{ steps.increment-version.outputs.next-version }} - # - name: Push NuGet packages - # if: ${{ steps.context.outputs.should-publish == 'true' }} - # run: dotnet nuget push --skip-duplicate '${{ env.NUGET_OUTPUT }}/*.nupkg' --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json + - name: Push NuGet packages + if: ${{ steps.context.outputs.should-publish == 'true' }} + run: dotnet nuget push --skip-duplicate '${{ env.NUGET_OUTPUT }}/*.nupkg' --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json - name: Upload coverage to CodeCov - # if: ${{ steps.context.outputs.should-publish == 'true' }} + if: ${{ steps.context.outputs.should-publish == 'true' }} run: bash <(curl -s https://codecov.io/bash) -f "$FILE_PATH" env: FILE_PATH: ${{ github.workspace }}/${{ env.COVERAGE_FOLDER }}/coverage.opencover.xml - # - name: Cascade - # uses: dolittle/cascade-action@v1 - # if: ${{ steps.context.outputs.should-publish == 'true' && env.CASCADES != '' }} - # with: - # token: ${{ secrets.BUILD_PAT }} - # version: ${{ steps.increment-version.outputs-next-version }} - # cascades: ${{ env.CASCADES }} + - name: Cascade + uses: dolittle/cascade-action@v1 + if: ${{ steps.context.outputs.should-publish == 'true' && env.CASCADES != '' }} + with: + token: ${{ secrets.BUILD_PAT }} + version: ${{ steps.increment-version.outputs-next-version }} + cascades: ${{ env.CASCADES }}