From cbff39c7fc82f543b69828cc1424d9a6e1c85058 Mon Sep 17 00:00:00 2001 From: Gabriel-Trintinalia Date: Tue, 13 Aug 2024 16:48:50 +1000 Subject: [PATCH] Create release body Signed-off-by: Gabriel-Trintinalia --- .github/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c966d10..47d8324 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: - 'v*' jobs: - build: + create_release: runs-on: ubuntu-latest @@ -31,6 +31,21 @@ jobs: env: JAVA_OPTS: -Xmx2g -Dorg.gradle.daemon=false + - name: Read configuration file + id: read_config + run: | + config=$(cat linea-besu/build.json) + echo "::set-output name=config::$config" + + - name: Generate release body + id: generate_body + run: | + config="${{ steps.read_config.outputs.config }}" + body="Draft release of version ${{ github.ref }}.\n\n## Modules and Versions\n" + modules=$(echo "$config" | jq -r '.modules[] | "- **\(.name)**: \(.version // "[source](\(.src))")"') + body="$body$modules" + echo "::set-output name=body::$body" + - name: Draft Release id: create_release uses: actions/create-release@v1 @@ -39,7 +54,7 @@ jobs: with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} - body: 'Draft release of version ${{ steps.get_version.outputs.VERSION }}.' + body: ${{ steps.generate_body.outputs.body }} draft: true prerelease: false