Skip to content

feat: add optional release notes body input #27

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 19 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
description: Generate attestations for artifacts
default: false
type: boolean
release-body:
description: The release body
type: string

permissions:
contents: write
Expand Down Expand Up @@ -77,7 +80,22 @@ jobs:
${{env.REPO_NAME}}.tar.gz
- name: Create GitHub release
run: |-
# Start with the basic note
RELEASE_NOTE="**NOTE:** Download \`$REPO_NAME.tar.gz\` for the *complete* source code."

# Append release body if provided
if [ -n "$RELEASE_BODY" ]; then
# Add two newlines to separate the note from the changelog
RELEASE_NOTE=$(cat <<EOF
$RELEASE_NOTE

$RELEASE_BODY
EOF
)
fi

gh release create "$GITHUB_REF_NAME" *.wasm "$REPO_NAME.tar.gz" \
-n "**NOTE:** Download \`$REPO_NAME.tar.gz\` for the *complete* source code."
-n "$RELEASE_NOTE"
env:
GH_TOKEN: ${{github.token}}
RELEASE_BODY: ${{ inputs.release-body }}