Some checks failed
Code Quality Check / Code Formatting (push) Failing after 21s
Code Quality Check / Security Analysis (push) Failing after 20s
Integration Testing / Integration Tests (2024.12.0, 3.13) (push) Failing after 1m32s
Integration Testing / Integration Tests (2025.9.4, 3.13) (push) Failing after 20s
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
create-release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install homeassistant==2025.9.4
|
|
pip install -r requirements-dev.txt
|
|
|
|
- name: Run Tests Before Release
|
|
run: |
|
|
mkdir -p custom_components
|
|
touch custom_components/__init__.py
|
|
python -m pytest tests/ -v --tb=short
|
|
|
|
- name: Create Release Archive
|
|
run: |
|
|
cd custom_components
|
|
zip -r ../adguard-control-hub-${{ github.ref_name }}.zip adguard_hub/
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: adguard-control-hub-${{ github.ref_name }}.zip
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|