From c51b13e70f51c9cffaf1eb84956d3221be48689b Mon Sep 17 00:00:00 2001 From: Will Jones Date: Wed, 4 Feb 2026 11:22:27 -0800 Subject: [PATCH] ci: fix publish failure notifications being skipped (#2976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary The `report-failure` jobs in npm, cargo, and pypi publish workflows checked for `release` or `workflow_dispatch` events, but these workflows are triggered by tag pushes where `github.event_name` is `push`. The condition was never true, so failure notifications were silently skipped. - Use `startsWith(github.ref, 'refs/tags/...')` to match actual tag triggers - Add `failure()` to only notify on actual failures This matches the pattern already used by `java-publish.yml`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 --- .github/workflows/cargo-publish.yml | 2 +- .github/workflows/npm-publish.yml | 2 +- .github/workflows/pypi-publish.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cargo-publish.yml b/.github/workflows/cargo-publish.yml index ab0683fe8..ee4e00099 100644 --- a/.github/workflows/cargo-publish.yml +++ b/.github/workflows/cargo-publish.yml @@ -42,7 +42,7 @@ jobs: name: Report Workflow Failure runs-on: ubuntu-latest needs: [build] - if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') + if: always() && failure() && startsWith(github.ref, 'refs/tags/v') permissions: contents: read issues: write diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index a1a57a24d..f326ef6eb 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -362,7 +362,7 @@ jobs: name: Report Workflow Failure runs-on: ubuntu-latest needs: [build-lancedb, test-lancedb, publish] - if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') + if: always() && failure() && startsWith(github.ref, 'refs/tags/v') permissions: contents: read issues: write diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 152be52fb..ee79166c6 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -181,7 +181,7 @@ jobs: permissions: contents: read issues: write - if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') + if: always() && failure() && startsWith(github.ref, 'refs/tags/python-v') steps: - uses: actions/checkout@v4 - uses: ./.github/actions/create-failure-issue