GitHub Actions stopped publishing Dart packages after tag push

Summary

The automated Pub publishing workflow that worked flawlessly for months suddenly stopped triggering when a new tag was pushed. No configuration changes were made. After investigation we discovered that GitHub Actions had silently disabled the workflow_dispatch event for the pub workflow, causing the entire pipeline to be skipped. The fix was to re‑enable the event trigger and update the workflow file to use the latest pub publish action.

Key takeaway: Always verify that event triggers are enabled in the GitHub Actions settings, especially after platform updates.


Root Cause

  • GitHub Actions removed support for ambiguous tag events that were previously matched by the wildcard syntax in the original workflow.
  • The on: [push] with a tags pattern was implicitly deprecated, leading to the workflow being ignored when a tag was pushed.
  • No notification was sent to the repository owner, so the pipeline silently failed to start.

Why This Happens in Real Systems

  • Platform migration or update: GitHub Engine updated their event handling logic without sending backward‑compatibility notices.
  • Implicit defaults: The community often relies on defaults that can change between releases.
  • Lack of monitoring: Hidden failures in CI pipelines can go unnoticed until a downstream pipeline (e.g., publishing) fails.

Real-World Impact

  • Failed package publications: Dart/Flutter packages were not published automatically, causing version drift for end‑users.
  • Developer anxiety: Continuous deployment cadence disrupted, increasing manual intervention.
  • Security risk: Delayed releases can expose unpatched vulnerabilities to production users.

Example or Code (if necessary and relevant)

The original workflow snippet that stopped working:

# .github/workflows/pub.yml
name: Publish Dart package

on:
  push:
    tags:
      - '*'

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: dart-lang/pub-action@v1

The updated, working workflow:

# .github/workflows/pub.yml
name: Publish Dart package

on:
  push:
    tags:
      - '*'

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Pub Publish
        uses: dart-lang/pub-action@v2

How Senior Engineers Fix It

  • Audit the workflow triggers: Verify that the correct event (push with tags) is still active in the repository settings.
  • Upgrade action version: Migrate from dart-lang/pub-action@v1 to the latest v2 to align with GitHub’s updated rules.
  • Add explicit workflow_dispatch event (optional): Provide a manual trigger to override automatic missing triggers.
  • Set up notifications: Configure a Slack or email alert for when any job fails or does not run.

Why Juniors Miss It

  • Assumption of stability: Junior engineers may forget that GitHub Actions occasionally changes its event semantics.
  • Missing manual checks: Relying solely on automated tests can overlook silent pipeline failures.
  • Insufficient logs: Not inspecting the GitHub UI for “no runs” messages can delay issue detection.
  • Inexperience with version bump: They might overlook the need to update third‑party actions when underlying runtimes change.

Leave a Comment