mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-18 20:02:36 +08:00
ci: Fix release workflow
This commit is contained in:
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user