Skip to content

Merge pull request #158 from gothrek22/feature/pre-commit-bump #72

Merge pull request #158 from gothrek22/feature/pre-commit-bump

Merge pull request #158 from gothrek22/feature/pre-commit-bump #72

Workflow file for this run

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