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