File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ changelog :
2+ categories :
3+ - title : ' 🚀 Features'
4+ labels :
5+ - ' feature'
6+ - ' enhancement'
7+ - title : ' 🐛 Bug Fixes'
8+ labels :
9+ - ' fix'
10+ - ' bugfix'
11+ - ' bug'
12+ - title : ' 📦 Dependency Updates'
13+ labels :
14+ - ' dependencies'
15+ - title : ' 🧰 Maintenance'
16+ labels :
17+ - ' chore'
18+ - ' maintenance'
19+ - title : ' 📚 Documentation'
20+ labels :
21+ - ' documentation'
22+ - ' docs'
23+ - title : ' Other Changes'
24+ labels :
25+ - ' *'
Original file line number Diff line number Diff line change 1- name : Release Drafter
1+ name : Draft Release
22
33on :
44 push :
55 branches :
66 - main
77
88permissions :
9- contents : read
9+ contents : write
1010
1111jobs :
12- update_release_draft :
13- permissions :
14- # write permission is required to create a github release
15- contents : write
12+ draft_release :
1613 runs-on : ubuntu-latest
1714 steps :
18- # Drafts your next Release notes as Pull Requests are merged into "main"
19- - uses : release-drafter/release-drafter@v7
15+ - name : Checkout repository
16+ uses : actions/checkout@v6
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Get version from manifest
21+ id : version
22+ run : |
23+ version=$(jq -r .version custom_components/victron_mqtt/manifest.json)
24+ echo "version=$version" >> $GITHUB_OUTPUT
25+
26+ - name : Create or update draft release
2027 env :
21- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
29+ run : |
30+ tag="v${{ steps.version.outputs.version }}"
31+ # Check if a draft release already exists for this tag
32+ existing=$(gh release list --json tagName,isDraft -q ".[] | select(.tagName == \"$tag\" and .isDraft) | .tagName")
33+ if [ -n "$existing" ]; then
34+ gh release edit "$tag" --draft --generate-notes
35+ else
36+ gh release create "$tag" --draft --generate-notes --title "$tag"
37+ fi
You can’t perform that action at this time.
0 commit comments