From e9d047615a8ed07dbe4425bcfbfffc183aeabf6b Mon Sep 17 00:00:00 2001 From: Antoine Beyeler <49431240+abey79@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:59:36 +0100 Subject: [PATCH] Enable GH releases for RC (#8524) This PR enables the creation of GH releases (as draft and marked as pre-release) for RCs. Motivations for doing so: - test that part of the workflow, in particular that all binaries are correctly produced - test the binary using `cargo binstall` - these releases a single-click deletable from GH (if we want to do so) - GH releases marked as "pre-release" aren't displayed in the GH project page Pending questions: do we want that? what about alphas? --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d046c9cfedc2..ec762a5278db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -321,7 +321,7 @@ jobs: github-release: name: "GitHub Release" - if: inputs.release-type == 'final' + if: inputs.release-type == 'rc' || inputs.release-type == 'final' needs: [ version, @@ -347,9 +347,16 @@ jobs: run: | version="${{ needs.version.outputs.final }}" commit="${{ needs.version.outputs.release-commit }}" + + if [ ${{ inputs.release-type }} = "final" ]; then + pre_arg="" + else + pre_arg="--prerelease" + fi + git tag $version $commit git push origin $version - gh release create $version --verify-tag --draft --title $version + gh release create $version --verify-tag --draft --title $version $pre_arg - name: Create comment env: