File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Update Version on Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ update-version :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ with :
16+ ref : main
17+ token : ${{ secrets.GITHUB_TOKEN }}
18+
19+ - name : Update manifest version
20+ run : |
21+ VERSION=${GITHUB_REF_NAME#v}
22+ echo "Updating version to $VERSION"
23+ jq --arg v "$VERSION" '.version = $v' custom_components/victron_mqtt/manifest.json > tmp.json
24+ mv tmp.json custom_components/victron_mqtt/manifest.json
25+
26+ - name : Commit and push
27+ run : |
28+ git config user.name "github-actions[bot]"
29+ git config user.email "github-actions[bot]@users.noreply.github.com"
30+ git add custom_components/victron_mqtt/manifest.json
31+ git commit -m "Bump version to ${GITHUB_REF_NAME#v}" || exit 0
32+ git push
33+
34+ - name : Update release tag to include version bump
35+ run : |
36+ git tag -f $GITHUB_REF_NAME
37+ git push -f origin $GITHUB_REF_NAME
You can’t perform that action at this time.
0 commit comments