Skip to content

Release

Release #68

Workflow file for this run

name: Release
on:
workflow_dispatch:
release:
types: [published]
env:
COMPONENT_DIR: hsem
permissions: read-all
jobs:
release_zip_file:
name: Prepare release asset
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Update manifest.json version to ${{ github.event.release.tag_name }}
run: |
python3 ${{ github.workspace }}/.github/scripts/update_hacs_manifest.py --version ${{ github.event.release.tag_name }} --path /custom_components/hsem/
- name: Commit manifest update
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add ./custom_components/hsem/manifest.json
git commit -m "Updated manifest.json"
git push origin HEAD:${{ github.event.release.target_commitish }}
- name: Create zip
run: |
cd custom_components/hsem
zip hsem.zip -r ./
- name: Upload zip to release
uses: svenstaro/upload-release-action@2.11.2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./custom_components/hsem/hsem.zip
asset_name: hsem.zip
tag: ${{ github.ref }}
overwrite: true