Skip to content

ci: run checks and publish on release branches - #1059

Merged
radu-mocanu merged 1 commit into
mainfrom
ci/run-and-publish-on-release-branches
Sep 1, 2026
Merged

ci: run checks and publish on release branches#1059
radu-mocanu merged 1 commit into
mainfrom
ci/run-and-publish-on-release-branches

Conversation

@radu-mocanu

Copy link
Copy Markdown
Collaborator

Scopes both workflows to release/** in addition to main.

 # ci.yml
   push:
     branches:
       - main
+      - 'release/**'
     paths-ignore:
       - pyproject.toml
   pull_request:
     branches:
       - main
+      - 'release/**'

 # cd.yml
   push:
     branches:
       - main
+      - 'release/**'
     paths:
       - pyproject.toml

Why

Hotfix releases are cut on release/* branches, but both workflows are scoped to main only.

Checks never run. ci.yml fires only for PRs targeting main, and it is the only workflow that calls lint.yml, test.yml and commitlint.yml. The MainProtect ruleset covers refs/heads/release/* and requires lint / Lint, commit-lint / Commit Lint, SonarCloud Code Analysis and the six test / Test (3.x, uipath-{ubuntu,windows}-latest) contexts. For a PR into a release branch nothing produces them, so every one sits at Expected — Waiting for status to be reported and the PR is unmergeable without an admin bypass. That happened on #1058, which had to be force-merged despite a clean local run.

Publishing never happens. cd.yml fires only on push to main, so merging a hotfix into its release branch publishes nothing and every release needs a manual workflow_dispatch. A dispatch also runs the workflow file from the dispatched ref, so a branch cut from an older commit runs an older CI definition than main's.

Is auto-publishing from a release branch safe

The pypi environment has no deployment branch policy or protection rules, so a release ref is already permitted to publish, and release/* is covered by MainProtect, which requires a pull request — nothing lands there unreviewed. The trigger is already filtered to paths: pyproject.toml, so only a version or dependency change starts a run.

Worth noting that this repo's publish step does not pass skip-existing, so a push touching pyproject.toml without a version bump would fail at upload rather than no-op. Happy to add skip-existing: true here if you would rather it be silent.

Known limitation

This does not retroactively fix a hotfix branch cut from a commit that predates the uipath-ubuntu-latest runner rename. Such a branch produces contexts named test / Test (3.11, ubuntu-latest), which do not match what the ruleset requires, so those PRs still need a bypass or a workflow sync. This change is what stops it recurring for branches cut from here on.

Copilot AI lite review requested due to automatic review settings September 1, 2026 11:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Pull request overview

This PR updates the repository’s CI and CD GitHub Actions workflows so they trigger not only on main, but also on release/** branches. This aligns workflow execution with the project’s hotfix/release process so required status checks and publishing can run on release branches.

Changes:

  • Extend .github/workflows/ci.yml triggers to run on push and pull_request events targeting release/** in addition to main.
  • Extend .github/workflows/cd.yml push trigger to run on release/** (still scoped to changes in pyproject.toml) in addition to main.
File summaries
File Description
.github/workflows/ci.yml Adds release/** to push and pull_request branch filters so CI reusable workflows run for release-branch PRs and pushes.
.github/workflows/cd.yml Adds release/** to the push branch filter so publishing can occur from release branches when pyproject.toml changes.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Hotfix releases are cut on release/* branches, but both workflows are
scoped to main:

- ci.yml only fires for PRs targeting main, so a PR into a release branch
  gets no checks. MainProtect covers refs/heads/release/* and requires
  lint, commit-lint, SonarCloud and the six test matrix contexts, so they
  sit at Expected forever and the PR cannot merge without a bypass.
- cd.yml only fires on push to main, so merging a hotfix publishes nothing
  and every release needs a manual workflow_dispatch.
@radu-mocanu
radu-mocanu enabled auto-merge (squash) September 1, 2026 15:04
@radu-mocanu
radu-mocanu force-pushed the ci/run-and-publish-on-release-branches branch from 3d30c3d to 5039604 Compare September 1, 2026 15:05
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@radu-mocanu
radu-mocanu merged commit 0c90d32 into main Sep 1, 2026
43 of 44 checks passed
@radu-mocanu
radu-mocanu deleted the ci/run-and-publish-on-release-branches branch September 1, 2026 15:18
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.

3 participants