File tree Expand file tree Collapse file tree 4 files changed +41
-3
lines changed
custom_components/crunch_o_meter Expand file tree Collapse file tree 4 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ release_zip_file :
9+ name : Prepare release asset
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Check out repository
13+ uses : actions/checkout@v1
14+
15+ - name : Get Version
16+ id : get_version
17+ run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
18+
19+ - name : " Set version number"
20+ run : |
21+ sed -i '/VERSION = /c\VERSION = "${{ steps.get_version.outputs.VERSION }}"' ${{ github.workspace }}/custom_components/crunch_o_meter/const.py
22+ sed -i '/version/c\ \"version\": \"${{ steps.get_version.outputs.VERSION }}\"' ${{ github.workspace }}/custom_components/crunch_o_meter/manifest.json
23+
24+ - name : Zip
25+ run : |
26+ cd ${{ github.workspace }}/custom_components/crunch_o_meter
27+ zip crunch_o_meter.zip -r ./
28+
29+ - name : Upload Zip to release
30+ uses : svenstaro/upload-release-action@v1-release
31+ with :
32+ repo_token : ${{ secrets.GITHUB_TOKEN }}
33+ file : ${{ github.workspace }}/custom_components/crunch_o_meter/crunch_o_meter.zip
34+ asset_name : crunch_o_meter.zip
35+ tag : ${{ github.ref }}
36+ overwrite : true
Original file line number Diff line number Diff line change 11DOMAIN = "crunch_o_meter"
2- VERSION = "1 .0.3"
2+ VERSION = "0 .0.0-dev" # Now updated by release workflow
33ISSUE_URL = "https://github.com/GuyLewin/home-assistant-crunch-o-meter"
44PLATFORM = "sensor"
55
Original file line number Diff line number Diff line change 99 " @guylewin"
1010 ],
1111 "requirements" : [],
12- "version" : " 1 .0.3 "
12+ "version" : " 0 .0.0-dev "
1313}
Original file line number Diff line number Diff line change 22 "name" : " Crunch-O-Meter" ,
33 "domains" : [" sensor" ],
44 "iot_class" : " Cloud Polling" ,
5- "render_readme" : true
5+ "render_readme" : true ,
6+ "zip_release" : true ,
7+ "filename" : " crunch_o_meter.zip"
68 }
You can’t perform that action at this time.
0 commit comments