Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create release body #22

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading