mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 13:10:30 -04:00
Only include Teslamate release notes if updated since last release (#38)
This commit is contained in:
@@ -35,12 +35,13 @@ jobs:
|
||||
- name: Get TeslaMate release notes
|
||||
run: |
|
||||
touch CHANGELOG.txt
|
||||
gh pr list --repo lildude/ha-addon-teslamate --state=merged --search="Update TeslaMate" --limit=1 --json=body --jq '.[].body' | sed -n "/<\/summary>/,/<\/details>/p" | sed '1d;$d' > changelog.tmp
|
||||
last_release_date=$(gh release list --repo lildude/ha-addon-teslamate --limit=1 --json=publishedAt)
|
||||
gh pr list --repo lildude/ha-addon-teslamate --state=merged --search="Update TeslaMate in:title closed:>$last_release_date" --limit=1 --json=body --jq '.[].body' | sed -n "/<\/summary>/,/<\/details>/p" | sed '1d;$d' > changelog.tmp
|
||||
if [ -s changelog.tmp ]; then
|
||||
echo "## TeslaMate Release Notes" > CHANGELOG.txt
|
||||
cat changelog.tmp >> CHANGELOG.txt
|
||||
echo -e "---\n\n## Add-on Release Notes\n\n" >> CHANGELOG.txt
|
||||
fi
|
||||
echo -e "---\n\n## Add-on Release Notes\n\n" >> CHANGELOG.txt
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create tag
|
||||
|
||||
Reference in New Issue
Block a user