Skip to content

Commit

Permalink
Update GitHub workflow (#87)
Browse files Browse the repository at this point in the history
Goal is to keep the integration version up to date.


Co-authored-by: Grégoire Seux <[email protected]>
  • Loading branch information
chpego and kamaradclimber authored Nov 27, 2024
1 parent 770813f commit 7161db1
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 22 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/hacs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
name: HACS Action
---
name: HACS Validation

on:
push:
branches:
- master
- main
pull_request:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
hacs:
name: HACS Action
runs-on: "ubuntu-latest"
name: HACS Validation
runs-on: ubuntu-latest
steps:
- name: HACS Action
uses: "hacs/action@main"
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4

- name: 🚀 Run HACS validation
uses: hacs/action@main
with:
category: "integration"
category: integration
23 changes: 13 additions & 10 deletions .github/workflows/hassfest.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Validate with hassfest
---
name: Hassfest

on:
push:
branches:
- master
- main
pull_request:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
validate:
runs-on: "ubuntu-latest"
hassfest:
name: Hassfest
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v2"
- uses: "home-assistant/actions/hassfest@master"
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4

- name: 🚀 Run hassfest validation
uses: home-assistant/actions/hassfest@master

45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Release

on:
release:
types:
- published

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4

- name: 🔢 Adjust version number
shell: bash
run: |
version="${{ github.event.release.tag_name }}"
version="${version,,}"
version="${version#v}"
yq e -P -o=json \
-i ".version = \"${version}\"" \
"${{ github.workspace }}/custom_components/vigieau/manifest.json"
- name: 📦 Created zipped release package
shell: bash
run: |
cd "${{ github.workspace }}/custom_components/vigieau"
zip vigieau.zip -r ./
- name: 🔏 Sign release package
uses: sigstore/[email protected]
with:
inputs: ${{ github.workspace }}/custom_components/vigieau/vigieau.zip

- name: ⬆️ Upload zip to release
uses: softprops/[email protected]
with:
files: ${{ github.workspace }}/custom_components/vigieau/vigieau.zip

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
execute-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 3 additions & 1 deletion hacs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
"name": "Vigieau",
"render_readme": true,
"country": "fr",
"homeassistant": "2023.7"
"homeassistant": "2023.7",
"zip_release": true,
"filename": "vigieau.zip"
}

0 comments on commit 7161db1

Please sign in to comment.