File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11on :
22 release :
33 types : [published]
4+ push :
5+ tags :
6+ - ' v*'
7+ workflow_dispatch :
8+ inputs :
9+ version :
10+ description : ' Version tag to build (e.g. v1.6.0). Leave blank to use the latest tag.'
11+ required : false
12+ type : string
13+
14+ permissions :
15+ contents : write
416
517jobs :
618 build :
719 runs-on : ubuntu-latest
820
921 steps :
1022 - uses : actions/checkout@v6
23+ with :
24+ ref : ${{ inputs.ref || github.ref }}
1125
1226 - name : Get version
1327 id : version
14- uses : home-assistant/actions/helpers/version@master
28+ run : |
29+ if [ -n "${{ inputs.version }}" ]; then
30+ echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
31+ else
32+ echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
33+ fi
1534
1635 - name : Setup Node.js
1736 uses : actions/setup-node@v4
@@ -26,13 +45,14 @@ jobs:
2645
2746 - name : Patch manifest and zip
2847 run : |
29- sed -i 's/v0.0.0/${{ steps.version.outputs.version }}/' custom_components/home_maintenance/manifest.json
30-
48+ sed -i "s/v0.0.0/${{ steps.version.outputs.version }}/" custom_components/home_maintenance/manifest.json
3149 cd custom_components/home_maintenance/
3250 zip ../../home_maintenance.zip ./* translations/* panel/dist/* -x '.*'
51+
3352 - name : Upload ZIP to Release
3453 uses : softprops/action-gh-release@v2
3554 with :
3655 files : home_maintenance.zip
56+ tag_name : ${{ steps.version.outputs.version }}
3757 env :
3858 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments