Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 25, 2025

The release workflow was broken after #537 added branches-ignore to prevent running on bot branches. While this successfully prevented unnecessary runs on copilot/**, dependabot/**, and pre-commit-ci-update-config branches, it inadvertently prevented the workflow from running on tag pushes.

The issue occurs because GitHub Actions treats tag pushes differently from branch pushes. When using branches-ignore without an explicit tags section, the workflow will only trigger on branch pushes (excluding the ignored ones) and pull requests, but not on tag pushes.

The release.yml workflow has a condition if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') indicating it's designed to run on tag pushes, but without the proper trigger configuration, it never gets the chance to execute.

This fix adds an explicit tags trigger to the workflow:

on:
  push:
    branches-ignore:
      - 'copilot/**'
      - 'dependabot/**'
      - 'pre-commit-ci-update-config'
    tags:
      - 'v*'
  pull_request:

This follows the same pattern used in:

  • The deepmd-kit repository (PR #3402) which had the identical issue
  • Other workflows in this repository (ci-docker.yml and publish_conda.yml) that already correctly trigger on tags

The workflow will now run on:

  • Branch pushes (excluding bot branches)
  • Tag pushes matching the v* pattern (e.g., v1.0.0, v2.1.3)
  • Pull requests

The PyPI publishing step will only execute when the workflow is triggered by a tag push, as intended by the existing condition.

Fixes #543.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 39.106.xx.xx
    • Triggering command: python -m coverage run -p --source=./dpdispatcher -m unittest -v (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Run release workflow on tags fix: add tags trigger to release workflow to enable tag-based releases Aug 25, 2025
@Copilot Copilot AI requested a review from njzjz August 25, 2025 15:20
Copilot finished work on behalf of njzjz August 25, 2025 15:20
@njzjz njzjz marked this pull request as ready for review August 25, 2025 15:54
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.32%. Comparing base (2fc5d55) to head (c0ab2dc).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #544       +/-   ##
===========================================
- Coverage   61.40%   47.32%   -14.09%     
===========================================
  Files          39       39               
  Lines        3905     3905               
===========================================
- Hits         2398     1848      -550     
- Misses       1507     2057      +550     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njzjz njzjz enabled auto-merge (squash) August 25, 2025 15:56
@njzjz njzjz merged commit 8b98b36 into master Aug 25, 2025
58 of 71 checks passed
@njzjz njzjz deleted the copilot/fix-543 branch August 25, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run release workflow on tags
2 participants