Skip to content

ci: scope workflows to the v2.x maintenance branch - #256

Merged
xiaoyijun merged 1 commit into
v2.xfrom
xiaoyijun-ci-v2x-release-workflows
Jun 11, 2026
Merged

ci: scope workflows to the v2.x maintenance branch#256
xiaoyijun merged 1 commit into
v2.xfrom
xiaoyijun-ci-v2x-release-workflows

Conversation

@xiaoyijun

@xiaoyijun xiaoyijun commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

master is now the v3 line; v2.x (cut from the last commit before #249) is the long-term maintenance branch for v2. This PR adapts the workflows on v2.x so v2 patches can be released independently — release-please operates per branch: the action's target-branch defaults to the branch that triggered the run, and the version is computed from this branch's .release-please-manifest.json (currently 2.0.2).

  • release.yml / main.yml: trigger on pushes / PRs to v2.x instead of master.
  • release-please-config.json: set versioning-strategy: always-bump-patch so a stray feat/feat! commit on the maintenance branch can never bump the version past 2.x.
  • New unmark-latest job: GitHub marks the most recently created release as "Latest" by default, so a v2 patch released after v3.0.0 would steal the badge from the v3 line. The job flips make_latest=false on every release cut from this branch (release-please has no built-in option for this — see Allow marking release as latest with make_latest googleapis/release-please#2317).

commitlint.yml and update-metadata.yml have no branch filters and already work for PRs targeting v2.x; workflows on master are untouched.

Testing

N/A (workflow-only change; will be exercised by the first v2 maintenance release)

Checklist

  • .changeset (N/A — this repo uses release-please)
  • unit tests (N/A)
  • integration tests (N/A)
  • necessary KDoc comments (N/A)

🤖 Generated with Claude Code

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.

Pull request overview

Scopes the v2 maintenance branch’s GitHub Actions automation so that CI and release-please operate independently from the new v3 (master) line, including preventing v2 patch releases from being marked as the repository’s “Latest” release.

Changes:

  • Restrict main.yml and release.yml triggers to pushes/PRs targeting v2.x (instead of master).
  • Configure release-please to always bump patch versions on v2.x via versioning-strategy: always-bump-patch.
  • Add a post-release job to explicitly set make_latest=false for releases cut from v2.x.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
release-please-config.json Forces patch-only version bumps on the v2 maintenance line.
.github/workflows/release.yml Runs release-please on v2.x and adds a job to unmark v2 releases as “Latest”.
.github/workflows/main.yml Limits CI execution to pushes and PRs against v2.x.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xiaoyijun
xiaoyijun merged commit 961a2d6 into v2.x Jun 11, 2026
6 checks passed
@xiaoyijun
xiaoyijun deleted the xiaoyijun-ci-v2x-release-workflows branch June 11, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants