From 700fbe71f8e261acb2fc5f67cdd905b282269ffb Mon Sep 17 00:00:00 2001 From: Naoyuki Sogo Date: Wed, 23 Sep 2026 01:12:09 +0900 Subject: [PATCH] ci: pin release tag_name's target_commitish to the triggering commit Same fix as RIKEN-RCCS/OPEN-WHEEL#148 on main, backported here: without an explicit target_commitish, softprops/action-gh-release's tag_name creates a new tag defaulted to the repository's default branch (main), not the branch this workflow actually ran on - silently mis-targeting this branch's release tags at main instead of maintenance2023's own commits. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01C3jKNM1qubomM8UTRdkEWu --- .github/workflows/build_and_deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index f4dbf56f..e70c262b 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -68,6 +68,11 @@ jobs: wheel_docker.tar.gz source.tar.gz tag_name: ${{ env.VERSION_NUMBER }} + # without this, the GitHub API creates a brand-new tag against the + # repository's default branch (main) regardless of which branch this + # workflow actually ran on - a maintenance/beta build's tag would + # silently point at main instead of its own branch. + target_commitish: ${{ github.sha }} name: "${{ env.TITLE_PREFIX }} ${{ env.VERSION_NUMBER }}" body: "release for ${{ github.ref_name }} @ ${{ github.sha }} (${{ env.VERSION_NUMBER }})" # only the master line ever takes the "Latest" badge and the