From 02839a199245605bf6605b640c0574649f5e7979 Mon Sep 17 00:00:00 2001 From: Se7enZ Date: Mon, 11 Nov 2024 16:40:07 +0100 Subject: [PATCH] build: Prepare release draft in Github actions. --- .github/workflows/release.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e32d52b1901..8890d3da557c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,7 +113,7 @@ jobs: delete-merged: true release: - name: Sign release + name: Sign and prepare release draft needs: - check - artifact @@ -160,3 +160,23 @@ jobs: name: c-lightning-${{ env.version }} overwrite: true path: release/ + + - name: Determine release data + id: release_data + run: | + CHANGELOG_TITLE=$(grep "## \[${v%?}${{ env.version }}}\]" CHANGELOG.md) + echo "CHANGELOG_TITLE=$CHANGELOG_TITLE" + echo "changelog_title=$CHANGELOG_TITLE" >> "$GITHUB_OUTPUT" + RELEASE_TITLE=$(echo $CHANGELOG_TITLE | cut -d'"' -f2) + echo "release_title=$RELEASE_TITLE" >> "$GITHUB_OUTPUT" + # TODO: Explore computing the body. + + - name: Prepare release draft + uses: softprops/action-gh-release@v2 + with: + name: "${{ env.version }} ${{ steps.release_data.outputs.release_title }}" + tag_name: ${{ env.version }} + draft: true + prerelease: contains(env.version "-rc") + files: release/* + fail_on_unmatched_files: true