Skip to content

Commit

Permalink
Merge pull request #22 from Gabriel-Trintinalia/release-body-draft
Browse files Browse the repository at this point in the history
Create release body
  • Loading branch information
Gabriel-Trintinalia authored Aug 13, 2024
2 parents 3793ae8 + cbff39c commit 9622e7c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'v*'

jobs:
build:
create_release:

runs-on: ubuntu-latest

Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 9622e7c

Please sign in to comment.