Skip to content

Commit

Permalink
Merge branch 'rc/test1' into feature/more-simple-extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-martinsmith committed Aug 21, 2024
2 parents e75f7f2 + 59c7f59 commit d913e4c
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ env:
COVERAGE_WARNING_THRESHOLD: 60
COVERAGE_ERROR_THRESHOLD: 80
NUGET_OUTPUT_FOLDER: nupkgs
BRANCH_RELEASE_CANDIDATE: rc/**
BRANCH_PREFIX_RELEASE_CANDIDATE: rc/
BRANCH_PREFIX_PUBLISH_CANDIDATE: beta/

on:
push:
Expand Down Expand Up @@ -55,6 +56,21 @@ jobs:
echo "package_suffix=${package_suffix}" >> $GITHUB_ENV
- name: Determing GitHub Releasing
id: should_release
run: |
should_release=false
if [ "${{ github.ref }}" == 'refs/heads/main' ]
then
should_release=true
elif [[ "${{ github.ref }}" == refs/heads/${{ env.BRANCH_PREFIX_RELEASE_CANDIDATE }}* ]]
then
should_publish=true
fi
echo "should_release=${should_release}" >> $GITHUB_ENV
- name: Determine package publishing
id: should_publish
run: |
Expand All @@ -66,7 +82,7 @@ jobs:
elif [ "${{ github.ref }}" == "refs/heads/main" ]
then
should_publish=true
elif [[ "${{ github.ref }}" == ${{ env.BRANCH_RELEASE_CANDIDATE }}* ]]
elif [[ "${{ github.ref }}" == refs/heads/${{ env.BRANCH_PREFIX_PUBLISH_CANDIDATE }}* ]]
then
should_publish=true
fi
Expand All @@ -85,6 +101,10 @@ jobs:
id: package_version
run: echo "package_version=${{ env.assembly_version }}${{ env.package_suffix }}" >> $GITHUB_ENV

- name: Show Configuration
id: show_configuration
run: env

outputs:
assembly_version: ${{ env.assembly_version }}
product_version: ${{ env.product_version }}
Expand Down Expand Up @@ -174,7 +194,7 @@ jobs:
## Generate a Release and Tag in git
release:
name: Create GitHub Release
if: github.ref == 'refs/heads/main' && success()
if: needs.setup.outputs.should_release == 'true' && success()

needs:
- setup
Expand Down Expand Up @@ -218,7 +238,7 @@ jobs:
## Publish to NuGet
publish:
name: Publish to NuGet
if: needs.setup.outputs.should_publish == 'true'
if: needs.setup.outputs.should_publish == 'true' && success()

needs:
- setup
Expand Down

0 comments on commit d913e4c

Please sign in to comment.