Update Github Actions
This commit is contained in:
parent
c563a3efd7
commit
3010cd3e03
|
@ -1,16 +1,37 @@
|
|||
name: HACS Action
|
||||
name: "Validate"
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
- cron: "0 0 * * *"
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
pull_request:
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
jobs:
|
||||
hacs:
|
||||
name: HACS Action
|
||||
hassfest: # https://developers.home-assistant.io/blog/2020/04/16/hassfest
|
||||
name: "Hassfest Validation"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: HACS Action
|
||||
uses: "hacs/action@main"
|
||||
with:
|
||||
category: "integration"
|
||||
- name: "Checkout the repository"
|
||||
uses: "actions/checkout@v3.5.3"
|
||||
|
||||
- name: "Run hassfest validation"
|
||||
uses: "home-assistant/actions/hassfest@master"
|
||||
|
||||
hacs: # https://github.com/hacs/action
|
||||
name: "HACS Validation"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout the repository"
|
||||
uses: "actions/checkout@v3.5.3"
|
||||
|
||||
- name: "Run HACS validation"
|
||||
uses: "hacs/action@main"
|
||||
with:
|
||||
category: "integration"
|
||||
# Remove this 'ignore' key when you have added brand images for your integration to https://github.com/home-assistant/brands
|
||||
ignore: "brands"
|
|
@ -1,11 +0,0 @@
|
|||
name: Validate with hassfest
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v3"
|
||||
- uses: home-assistant/actions/hassfest@master
|
|
@ -1,27 +1,35 @@
|
|||
name: Release
|
||||
name: "Release"
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
types:
|
||||
- "published"
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Prepare release
|
||||
runs-on: ubuntu-latest
|
||||
name: "Release"
|
||||
runs-on: "ubuntu-latest"
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Download repo
|
||||
uses: actions/checkout@v3
|
||||
- name: "Checkout the repository"
|
||||
uses: "actions/checkout@v3.5.3"
|
||||
|
||||
- name: Zip samsung_soundbar dir
|
||||
- name: "Adjust version number"
|
||||
shell: "bash"
|
||||
run: |
|
||||
cd /home/runner/work/ha_samsung_soundbar/ha_samsung_soundbar/custom_components/samsung_soundbar
|
||||
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \
|
||||
"${{ github.workspace }}/custom_components/samsung_soundbar/manifest.json"
|
||||
|
||||
- name: "ZIP the integration directory"
|
||||
shell: "bash"
|
||||
run: |
|
||||
cd "${{ github.workspace }}/custom_components/samsung_soundbar"
|
||||
zip samsung_soundbar.zip -r ./
|
||||
|
||||
- name: Upload zip to release
|
||||
uses: svenstaro/upload-release-action@v1-release
|
||||
- name: "Upload the ZIP file to the release"
|
||||
uses: softprops/action-gh-release@v0.1.15
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: /home/runner/work/ha_samsung_soundbar/ha_samsung_soundbar/custom_components/samsung_soundbar/samsung_soundbar.zip
|
||||
asset_name: samsung_soundbar.zip
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
files: ${{ github.workspace }}/custom_components/samsung_soundbar/samsung_soundbar.zip
|
Loading…
Reference in New Issue