Merge pull request #148 from h4de5/dependabot/pip/homeassistant-2023.9.0 #70
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Read Properties | |
id: read_property | |
uses: ashley-taylor/[email protected] | |
with: | |
path: custom_components/toshiba_ac/manifest.json | |
property: version | |
- name: Get Latest Release | |
id: get_latest_release | |
uses: joutvhu/get-release@v1 | |
with: | |
latest: true | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check version | |
run: | | |
echo Uploaded version: ${{ steps.read_property.outputs.value }} | |
echo Latest version: ${{ steps.get_latest_release.outputs.name }} | |
- name: Skip release | |
if: ${{ steps.read_property.outputs.value == steps.get_latest_release.outputs.name }} | |
run: | | |
echo Skipping release because version did not change! | |
- name: Create zip asset | |
if: ${{ steps.read_property.outputs.value != steps.get_latest_release.outputs.name }} | |
uses: TheDoctor0/[email protected] | |
with: | |
filename: toshiba_ac-${{ steps.read_property.outputs.value }}.zip | |
directory: custom_components/ | |
type: zip | |
- name: Create release | |
if: ${{ steps.read_property.outputs.value != steps.get_latest_release.outputs.name }} | |
uses: meeDamian/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.read_property.outputs.value }} | |
name: ${{ steps.read_property.outputs.value }} | |
body: ${{ github.event.head_commit.message }} | |
files: custom_components/toshiba_ac-${{ steps.read_property.outputs.value }}.zip | |
gzip: false |