-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
96 additions
and
31 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: "Lint" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
ruff: | ||
name: "Ruff" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout the repository" | ||
uses: "actions/[email protected]" | ||
|
||
- name: "Set up Python" | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
cache: "pip" | ||
|
||
- name: "Install requirements" | ||
run: python3 -m pip install -r requirements.txt | ||
|
||
- name: "Run" | ||
run: python3 -m ruff check . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "Release" | ||
|
||
on: | ||
release: | ||
types: | ||
- "published" | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release: | ||
name: "Release" | ||
runs-on: "ubuntu-latest" | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: "Checkout the repository" | ||
uses: "actions/[email protected]" | ||
|
||
- name: "Adjust version number" | ||
shell: "bash" | ||
run: | | ||
yq -i -o json '.version="${{ github.event.release.tag_name }}"' \ | ||
"${{ github.workspace }}/custom_components/weatherflow_forecast/manifest.json" | ||
- name: "ZIP the integration directory" | ||
shell: "bash" | ||
run: | | ||
cd "${{ github.workspace }}/custom_components/weatherflow_forecast" | ||
zip weatherflow_forecast.zip -r ./ | ||
- name: "Upload the ZIP file to the release" | ||
uses: softprops/[email protected] | ||
with: | ||
files: ${{ github.workspace }}/custom_components/weatherflow_forecast/weatherflow_forecast.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,39 @@ | ||
name: HACS Action | ||
name: "Validate" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
push: | ||
paths-ignore: | ||
- '**/README.md' | ||
- '**/CHANGELOG.md' | ||
- "**/README.md" | ||
- "**/info.md" | ||
- "**/CHANGELOG.md" | ||
branches: | ||
- "main" | ||
pull_request: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
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: | ||
- uses: "actions/checkout@v3" | ||
- name: HACS Action | ||
uses: "hacs/action@main" | ||
with: | ||
category: "integration" | ||
- name: "Checkout the repository" | ||
uses: "actions/[email protected]" | ||
|
||
- 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/[email protected]" | ||
|
||
- name: "Run HACS validation" | ||
uses: "hacs/action@main" | ||
with: | ||
category: "integration" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
colorlog==6.7.0 | ||
homeassistant==2023.9.2 | ||
homeassistant==2023.9.3 | ||
pip>=23.2.1,<23.3 | ||
ruff==0.0.267 | ||
ruff==0.0.290 |