-
Notifications
You must be signed in to change notification settings - Fork 19
58 lines (49 loc) · 1.79 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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