diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..69eeaef --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Build + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Get version + id: version + uses: home-assistant/actions/helpers/version@master + + - name: Patch manifest and zip + run: | + sed -i 's/v0.0.0/${{ steps.version.outputs.version }}/' custom_components/intesisbox/manifest.json + cd custom_components/intesisbox/ + zip ../../intesisbox.zip -r ./ + + - uses: JasonEtco/upload-to-release@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: ./intesisbox.zip application/zip diff --git a/custom_components/intesisbox/manifest.json b/custom_components/intesisbox/manifest.json index b1d2326..32f7807 100644 --- a/custom_components/intesisbox/manifest.json +++ b/custom_components/intesisbox/manifest.json @@ -1,7 +1,7 @@ { "domain": "intesisbox", "name": "IntesisBox", - "version": "0.99", + "version": "v0.0.0", "documentation": "https://github.com/jnimmo/hass-intesisbox", "issue_tracker": "https://github.com/jnimmo/hass-intesisbox/issues", "dependencies": [],