Skip to content

Commit

Permalink
Support prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-martinsmith committed Aug 21, 2024
1 parent a68f8c1 commit 61f6a31
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
run: |
should_release=false
release_is_draft=false
release_is_prerelease=false
if [ "${{ github.ref }}" == 'refs/heads/main' ]
then
Expand All @@ -69,10 +70,17 @@ jobs:
then
should_release=true
release_is_draft=true
if [ "${{ github.event_name }}" == "pull_request" ]
then
release_is_draft=false
release_is_prerelease=true
fi
fi
echo "should_release=${should_release}" >> $GITHUB_ENV
echo "release_is_draft=${release_is_draft}" >> $GITHUB_ENV
echo "release_is_prerelease=${release_is_prerelease}" >> $GITHUB_ENV
- name: Determine package publishing
id: should_publish
Expand Down Expand Up @@ -115,6 +123,7 @@ jobs:
should_publish: ${{ env.should_publish }}
should_release: ${{ env.should_release }}
release_is_draft: ${{ env.release_is_draft }}
release_is_prerelease: ${{ env.release_is_prerelease }}

##########################################################
## Build DotNet projects
Expand Down Expand Up @@ -229,6 +238,7 @@ jobs:
name: Release ${{ needs.setup.outputs.assembly_version }}
body: ${{ steps.build_changelog.outputs.changelog }}
draft: ${{ needs.setup.outputs.release_is_draft }}
prerelease: ${{ needs.setup.outputs.release_is_prerelease }}
removeArtifacts: true
artifacts: '**/*.nupkg'

Expand Down

0 comments on commit 61f6a31

Please sign in to comment.