fix: 再利用可能ワークフロー呼び出し時のブランチ参照不整合とトリガー条件の修正

PRマージのトリガーによる自動リリースプロセス全体がエラーなく連動して動作するよう、不備をすべて解消

- bump-and-tag.yml の paths-ignore から .github/workflows/** を削除
- release.yml および publish.yml に workflow_call 用 of tag 引数を追加し、 checkout ref に適用
- release.yml のバージョン取得処理で tag 引数がある場合はそれを優先するようフォールバック処理を追加
- bump-and-tag.yml の呼び出し部分に tag 引数の引き渡しを追加
This commit is contained in:
Taremin
2026-07-04 09:31:13 +09:00
parent c3a43c5e73
commit ba6c693b01
3 changed files with 23 additions and 2 deletions
+4 -1
View File
@@ -6,7 +6,6 @@ on:
- master
paths-ignore:
- 'js/index.js'
- '.github/workflows/**'
permissions:
contents: write
@@ -87,9 +86,13 @@ jobs:
trigger-release:
needs: bump-version
uses: ./.github/workflows/release.yml
with:
tag: ${{ needs.bump-version.outputs.tag }}
secrets: inherit
trigger-publish:
needs: bump-version
uses: ./.github/workflows/publish.yml
with:
tag: ${{ needs.bump-version.outputs.tag }}
secrets: inherit
+6
View File
@@ -7,6 +7,10 @@ on:
paths:
- "pyproject.toml"
workflow_call:
inputs:
tag:
required: false
type: string
permissions:
issues: write
@@ -19,6 +23,8 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
+13 -1
View File
@@ -5,6 +5,10 @@ on:
tags:
- "v[0-9]+\\.[0-9]+\\.[0-9]+"
workflow_call:
inputs:
tag:
required: false
type: string
jobs:
create_release:
@@ -15,6 +19,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.tag || github.ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
@@ -29,7 +34,14 @@ jobs:
run: |
REPOSITORY=$(echo ${{ github.event.repository.name }})
echo "repository=$REPOSITORY" >> "$GITHUB_OUTPUT"
VERSION=$(basename ${{ github.ref }})
INPUT_TAG="${{ inputs.tag }}"
if [ -n "$INPUT_TAG" ]; then
VERSION="$INPUT_TAG"
else
VERSION=$(basename ${{ github.ref }})
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
VERSION_STRING=$(echo $VERSION | sed -e "s#\.#_#g")
echo "version_string=$VERSION_STRING" >> "$GITHUB_OUTPUT"