mirror of
https://github.com/tykeal/homeassistant-rental-control.git
synced 2026-06-24 08:47:51 +00:00
Configure SPDX headers in all files along with adding the needed license text. Configure the reuse tool to validate all license and copyright headers exist and are correct. Signed-off-by: Andrew Grimberg <tykeal@bardicgrove.org>
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
---
|
|
# SPDX-FileCopyrightText: 2021 Andrew Grimberg <tykeal@bardicgrove.org>
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
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: Checkout repository
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
|
|
- 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/rental_control/const.py
|
|
sed -i '/version/c\ \"version\": \"${{ steps.get_version.outputs.VERSION }}\"' ${{ github.workspace }}/custom_components/rental_control/manifest.json
|
|
# yamllint enable
|
|
# Pack the rental_control dir as a zip and upload to the release
|
|
|
|
- name: ZIP rental_control Dir
|
|
run: |
|
|
cd ${{ github.workspace }}/custom_components/rental_control
|
|
zip rental_control.zip -r ./
|
|
|
|
- name: Upload zip to release
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
# yamllint disable-line rule:line-length
|
|
file: ${{ github.workspace }}/custom_components/rental_control/rental_control.zip
|
|
asset_name: rental_control.zip
|
|
tag: ${{ github.ref }}
|
|
overwrite: true
|