Skip to content

Compatibility improvements #7

Compatibility improvements

Compatibility improvements #7

Workflow file for this run

name: Release
on:
release:
types: [published]
env:
COMPONENT_NAME: xiaomi_cloud_map_extractor
jobs:
release:
name: Prepare release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download repo
uses: actions/checkout@v4.2.2
- name: Adjust version number
shell: bash
run: |
version="${{ github.event.release.tag_name }}"
yq e -P -o=json \
-i ".version = \"${version}\"" \
"${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}/manifest.json"
- name: Zip ${{ env.COMPONENT_NAME }} dir
run: |
cd "${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}"
zip ${{ env.COMPONENT_NAME }}.zip -r ./
- name: Upload zip to release
uses: softprops/action-gh-release@v2.1.0
with:
files: ${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}/${{ env.COMPONENT_NAME }}.zip