From 605e05ea9578e2bbfa66958c0be07de9e655f868 Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Sun, 9 Nov 2025 16:26:16 +0000 Subject: [PATCH] fix(workflows): remove duplicate validation runs in release workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release workflow now trusts that validate.yml and lint.yml have already run on the main branch commit before tag creation. This prevents duplicate workflow executions. Workflow execution flow: 1. Push to main → validate.yml + lint.yml run (quality gate) 2. prepare-release or auto-tag creates version tag 3. release.yml runs (generates release notes, no validation) This ensures: - Every main commit is validated/linted before tag creation - No duplicate workflow runs (validate/lint run once per commit) - Release workflow is faster (no redundant checks) - Simple, predictable workflow chain Impact: Release process is more efficient and workflows don't run twice. --- .github/workflows/release.yml | 50 +++-------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4a451fa..c63cfe0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,55 +15,11 @@ permissions: contents: write # Needed to create/update releases and push commits jobs: - # Run validation first - release only proceeds if this passes - validate: - name: Validate before release - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }} - - - name: Run hassfest validation - uses: home-assistant/actions/hassfest@master - - - name: Run HACS validation - uses: hacs/action@main - with: - category: integration - - # Run linting - release only proceeds if this passes - lint: - name: Lint before release - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }} - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: "3.13" - - - name: Install uv - uses: astral-sh/setup-uv@v7 - with: - version: "0.9.3" - - - name: Install dependencies - run: uv sync --frozen - - - name: Run Ruff check - run: uv run ruff check . - - - name: Run Ruff format check - run: uv run ruff format --check . + # Note: We trust that validate.yml and lint.yml have already run on the + # main branch commit before the tag was created (either by prepare-release + # script or auto-tag workflow). This avoids duplicate workflow runs. sync-manifest: - needs: [validate, lint] # Only runs if validation and linting pass name: Sync manifest.json with tag version runs-on: ubuntu-latest outputs: