ci: Fix release workflow

This commit is contained in:
Taiki Endo
2026-03-27 02:22:49 +09:00
parent 80779d0b81
commit 4bb73acd2d

View File

@@ -39,6 +39,7 @@ jobs:
fallback: none
- id: check
run: |
set +x
IFS=$'\n\t'
trap -- 's=$?; printf >&2 "%s\n" "${0##*/}:${LINENO}: \`${BASH_COMMAND}\` exit with ${s}"; exit ${s}' ERR
retry() {
@@ -222,6 +223,7 @@ jobs:
- name: Create and push release commit and tag
id: push
run: |
set +x
IFS=$'\n\t'
trap -- 's=$?; printf >&2 "%s\n" "${0##*/}:${LINENO}: \`${BASH_COMMAND}\` exit with ${s}"; exit ${s}' ERR
retry() {
@@ -329,7 +331,6 @@ jobs:
git tag -f "${major_version_tag}"
refs=("refs/heads/releases/${major_version_tag}" "+refs/tags/${major_version_tag}")
if [[ "${INSTALL_ACTION}" == 'true' ]]; then
tools=()
for tool in tools/codegen/base/*.json; do
tool="${tool##*/}"
@@ -361,12 +362,9 @@ jobs:
refs+=("+refs/heads/releases/${tool}" "+refs/tags/${tool}")
branches+=("releases/${tool}")
done
fi
retry git push origin --atomic "${refs[@]}"
git branch -d "releases/${major_version_tag}"
if [[ "${INSTALL_ACTION}" == 'true' ]]; then
git branch -D "${branches[@]}"
schema_workspace=/tmp/workspace
@@ -411,8 +409,6 @@ jobs:
git worktree prune
# TODO: get branch in schema_workspace dir instead
git branch -D "${schema_branch}" "${schema_workspace##*/}"
fi
)
env:
VERSION: ${{ needs.prepare.outputs.version }}