Skip to content

Update Release Notes (v1.0.0-beta4) #2

Update Release Notes (v1.0.0-beta4)

Update Release Notes (v1.0.0-beta4) #2

name: Update Changelog Release Notes
run-name: Update Release Notes (${{ github.ref_name }})
on:
release:
types: [created]
jobs:
update-release-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate Changelog
id: changelog
uses: infocus7/[email protected]
with:
changelog-directory: 'changelogs'
release-tag-name: ${{ github.ref_name }}
- name: Download Changelog # This is needed because the action outputs the changelog to an artifact (file).
uses: actions/download-artifact@v2
with:
name: changelog
- name: Update Release Notes
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_NAME: ${{ github.repository }}
RELEASE_ID: ${{ github.event.release.id }}
run: |
changelog_content=$(jq -Rs . < changelog_output.md) # Convert the changelog to a JSON string so we can send it.
curl -L -X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/repos/$REPO_NAME/releases/$RELEASE_ID" \
-d "{\"body\": $changelog_content}"