Skip to content

0.4.0

0.4.0 #11

Workflow file for this run

---
name: Release
# yamllint disable-line rule:truthy
on:
release:
types: [published]
jobs:
release_zip_file:
name: Prepare release asset
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Get Version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
- name: Update versions
# yamllint disable rule:line-length
run: |
sed -i '/VERSION = /c\VERSION = \"${{ steps.get_version.outputs.VERSION }}\"' ${{ github.workspace }}/custom_components/lock_code_manager/const.py
sed -i '/version/c\ \"version\": \"${{ steps.get_version.outputs.VERSION }}\"' ${{ github.workspace }}/custom_components/lock_code_manager/manifest.json
# yamllint enable rule:line-length
# Pack the lock_code_manager dir as a zip and upload to the release
- name: ZIP Lock Code Manager Dir
run: |
cd ${{ github.workspace }}/custom_components/lock_code_manager
zip lock_code_manager.zip -r ./
- name: Upload zip to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/custom_components/lock_code_manager/lock_code_manager.zip
asset_name: lock_code_manager.zip
tag: ${{ github.ref }}
overwrite: true