From 5d23b36cec2f8904f9d4c0aa05fbd5cba6b464ea Mon Sep 17 00:00:00 2001 From: Evan Hu Date: Sun, 6 Sep 2026 22:17:50 +0900 Subject: [PATCH] =?UTF-8?q?fix(release):=20release-please=20=E6=98=BE?= =?UTF-8?q?=E5=BC=8F=E6=8C=87=E5=90=91=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit release-please 默认读写仓库默认分支,切到 develop 之后它会把版本 PR、CHANGELOG 和 tag 全写到 develop,而发布流水线按名字等待的 release-please--branches--main--* 分支不会出现,整条链在没有报错的情况下停住。 --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 640cdc35..2cb5a2b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,8 @@ jobs: id: release_pr uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5 with: + # release-please reads and writes the repository's default branch unless told otherwise, and that is now develop. The release branch is main: without this the version pull request, the changelog and the tag all land on develop, and the branch this workflow waits for (release-please--branches--main--*) is never created. + target-branch: main token: ${{ secrets.RELEASE_PLEASE_TOKEN }} skip-github-pull-request: true @@ -74,6 +76,7 @@ jobs: id: release_update uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5 with: + target-branch: main # A trusted credential starts normal PR checks without manual workflow approval. token: ${{ secrets.RELEASE_PLEASE_TOKEN }} skip-github-release: true @@ -90,6 +93,7 @@ jobs: id: release uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5 with: + target-branch: main # Creating a tag at a historical workflow-changing commit needs workflows:write. # Only GITHUB_TOKEN merges to main, preventing a second Release run. token: ${{ secrets.RELEASE_PLEASE_TOKEN }}