From 61f6a313956587153fe2c204ed1b84a75a6b61b0 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 22 Aug 2024 00:36:10 +0100 Subject: [PATCH] Support prerelease --- .github/workflows/ci-build.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 819d841..71069a7 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -61,6 +61,7 @@ jobs: run: | should_release=false release_is_draft=false + release_is_prerelease=false if [ "${{ github.ref }}" == 'refs/heads/main' ] then @@ -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 @@ -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 @@ -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'