Skip to content

0.0.1

0.0.1 #1

Workflow file for this run

name: Release
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 ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Update versions
run: |
sed -i 's/VERSION = "0.0.0"/VERSION = "${{ steps.get_version.outputs.VERSION }}"/g' ${{ github.workspace }}/custom_components/lock_code_manager/const.py
sed -i 's/"version": "0.0.0"/"version": "${{ steps.get_version.outputs.VERSION }}"/g' ${{ github.workspace }}/custom_components/lock_code_manager/manifest.json
sed -i 's/"version": "0.0.0"/"version": "${{ steps.get_version.outputs.VERSION }}"/g' ${{ github.workspace }}/package.json
# Pack the lock_code_manager dir as a zip and upload to the release
- name: ZIP Keymaster 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