Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Mar 10, 2023
1 parent 68eba41 commit 7f3e654
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Release"

on:
release:
types:
- "published"

jobs:
release:
name: "Release"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout the repository"
uses: "actions/checkout@v3.3.0"

- name: "Adjust version number"
shell: "bash"
run: |
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
"${{ github.workspace }}/custom_components/integration_blueprint/manifest.json"
- name: "ZIP the integration directory"
shell: "bash"
run: |
cd "${{ github.workspace }}/custom_components/integration_blueprint"
zip integration_blueprint.zip -r ./
- name: "Upload the ZIP file to the release"
uses: softprops/action-gh-release@v0.1.15
with:
files: ${{ github.workspace }}/custom_components/integration_blueprint/integration_blueprint.zip
5 changes: 4 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "Integration blueprint",
"filename": "integration_blueprint.zip",
"hide_default_branch": true,
"homeassistant": "2022.2.0",
"render_readme": true,
"homeassistant": "2022.2.0"
"zip_release": true
}

0 comments on commit 7f3e654

Please sign in to comment.