Skip to content

Commit

Permalink
[github-release.yml] Include the release body in the GitHub release.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Jul 24, 2023
1 parent 0072395 commit ac3cc92
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,23 @@ jobs:
GITHUB_REF=${{ github.ref }}
RELEASE_NAME=${GITHUB_REF#"refs/tags/"}
echo "RELEASE_NAME=${RELEASE_NAME}" >> $GITHUB_ENV
# We'd use `github.event.head_commit.message`, but that includes the first line of the message. So we check out the code.
- name: Check out code for release body calculation using `git` itself
uses: actions/checkout@v3
- name: Calculate release body
run: |
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "RELEASE_BODY<<$EOF" >> $GITHUB_ENV
git log --format=%b -n 1 HEAD >> $GITHUB_ENV
echo "$EOF" >> $GITHUB_ENV
- name: Publish release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.RELEASE_NAME }}
body: ${{ env.RELEASE_BODY }}
draft: false
prerelease: false

0 comments on commit ac3cc92

Please sign in to comment.