mirror of
https://github.com/lildude/ha-addon-teslamate.git
synced 2026-10-13 21:19:16 -04:00
Update Renovate configuration and fix inclusion of TeslaMate release notes in add-on changelog (#13)
* Fix renovate config * Fix including TeslaMate release notes
This commit is contained in:
@@ -8,16 +8,13 @@
|
|||||||
"prBodyTemplate": "{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}",
|
"prBodyTemplate": "{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}",
|
||||||
"semanticCommits": "disabled",
|
"semanticCommits": "disabled",
|
||||||
"commitMessageTopic": "{{#if (containsString depName 'teslamate')}}TeslaMate{{else}}{{depName}}{{/if}}",
|
"commitMessageTopic": "{{#if (containsString depName 'teslamate')}}TeslaMate{{else}}{{depName}}{{/if}}",
|
||||||
"enabledManagers": ["custom.regex", "github-actions"],
|
"enabledManagers": ["custom.regex", "github-actions", "dockerfile"],
|
||||||
"customManagers": [
|
"customManagers": [
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"fileMatch": ["^Dockerfile$", "^build.json$"],
|
"fileMatch": "^build.json$",
|
||||||
"matchStringsStrategy": "any",
|
|
||||||
"matchStrings": [
|
"matchStrings": [
|
||||||
"\"teslamate_version\": \"(?<currentValue>\\d+\\.\\d+\\.\\d+)\"",
|
"\"teslamate_version\": \"(?<currentValue>\\d+\\.\\d+\\.\\d+)\"",
|
||||||
"FROM=teslamate/(grafana|teslamate):(?<currentValue>.*?)\\s+",
|
|
||||||
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?teslamate/teslamate:(?<currentValue>.*?)[\"']?\\s"
|
|
||||||
],
|
],
|
||||||
"datasourceTemplate": "github-releases",
|
"datasourceTemplate": "github-releases",
|
||||||
"depNameTemplate": "teslamate-org/teslamate"
|
"depNameTemplate": "teslamate-org/teslamate"
|
||||||
|
|||||||
@@ -32,6 +32,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
semver-input: ${{ env.latest_release }}
|
semver-input: ${{ env.latest_release }}
|
||||||
increment: ${{ github.event.inputs.semverIncrement }}
|
increment: ${{ github.event.inputs.semverIncrement }}
|
||||||
|
- 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
|
||||||
|
if [ -s changelog.tmp ]; then
|
||||||
|
echo "## TeslaMate Release Notes" > CHANGELOG.txt
|
||||||
|
cat changelog.tmp >> CHANGELOG.txt
|
||||||
|
echo "---" >> CHANGELOG.txt
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create tag
|
- name: Create tag
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "actions.no-reply@github.com"
|
git config --global user.email "actions.no-reply@github.com"
|
||||||
@@ -39,19 +50,11 @@ jobs:
|
|||||||
git tag -a v${{ steps.semver.outputs.semver }} -m 'Release automation'
|
git tag -a v${{ steps.semver.outputs.semver }} -m 'Release automation'
|
||||||
git push --tags
|
git push --tags
|
||||||
working-directory: ${{ github.workspace }}/teslamate
|
working-directory: ${{ github.workspace }}/teslamate
|
||||||
- name: Get TeslaMate release notes
|
|
||||||
run: |
|
|
||||||
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
|
|
||||||
if [ -s changelog.tmp ]; then
|
|
||||||
echo "## TeslaMate Release Notes" > CHANGELOG.txt
|
|
||||||
cat changelog.tmp >> CHANGELOG.txt
|
|
||||||
echo "---" >> CHANGELOG.txt
|
|
||||||
fi
|
|
||||||
rm -f CHANGELOG.txt
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v2.0.5
|
uses: softprops/action-gh-release@v2.0.5
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.semver.outputs.semver }}
|
tag_name: v${{ steps.semver.outputs.semver }}
|
||||||
|
body_path: CHANGELOG.txt
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
|||||||
Reference in New Issue
Block a user