mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 23:20:26 +00:00
ci: Fix release workflow
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -155,7 +155,7 @@ jobs:
|
|||||||
- run: env
|
- run: env
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
# NB: Update alias list in tools/publish.rs, case for aliases in main.sh,
|
# NB: Update alias list in release.yml, case for aliases in main.sh,
|
||||||
# and match for alias for tools/codegen/src/tools-markdown.rs.
|
# and match for alias for tools/codegen/src/tools-markdown.rs.
|
||||||
tool: |
|
tool: |
|
||||||
nextest
|
nextest
|
||||||
|
|||||||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -91,7 +91,6 @@ jobs:
|
|||||||
printf '%s\n' "release-date=${release_date}" >>"${GITHUB_OUTPUT}"
|
printf '%s\n' "release-date=${release_date}" >>"${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
# Get the current revision.
|
# Get the current revision.
|
||||||
retry git fetch origin &>/dev/null
|
|
||||||
rev=$(git rev-parse HEAD)
|
rev=$(git rev-parse HEAD)
|
||||||
printf '%s\n' "rev: ${rev}"
|
printf '%s\n' "rev: ${rev}"
|
||||||
printf '%s\n' "rev=${rev}" >>"${GITHUB_OUTPUT}"
|
printf '%s\n' "rev=${rev}" >>"${GITHUB_OUTPUT}"
|
||||||
@@ -259,7 +258,7 @@ jobs:
|
|||||||
release_date="${RELEASE_DATE}"
|
release_date="${RELEASE_DATE}"
|
||||||
|
|
||||||
# Make sure the current revision is same as prepare step.
|
# Make sure the current revision is same as prepare step.
|
||||||
retry git fetch origin &>/dev/null
|
retry git fetch origin --unshallow &>/dev/null
|
||||||
rev=$(git rev-parse HEAD)
|
rev=$(git rev-parse HEAD)
|
||||||
if [[ "${rev}" != "${PREPARE_REV}" ]]; then
|
if [[ "${rev}" != "${PREPARE_REV}" ]]; then
|
||||||
bail "revision difference between prepare step"
|
bail "revision difference between prepare step"
|
||||||
@@ -324,12 +323,11 @@ jobs:
|
|||||||
set -x
|
set -x
|
||||||
git tag "${tag}"
|
git tag "${tag}"
|
||||||
retry git push origin HEAD
|
retry git push origin HEAD
|
||||||
retry git push origin refs/tags/"${tag}"
|
|
||||||
|
|
||||||
major_version_tag="v${version%%.*}"
|
major_version_tag="v${version%%.*}"
|
||||||
git branch "releases/${major_version_tag}"
|
git branch "releases/${major_version_tag}"
|
||||||
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/tags/${tag}" "refs/heads/releases/${major_version_tag}" "+refs/tags/${major_version_tag}")
|
||||||
|
|
||||||
tools=()
|
tools=()
|
||||||
for tool in tools/codegen/base/*.json; do
|
for tool in tools/codegen/base/*.json; do
|
||||||
@@ -358,7 +356,7 @@ jobs:
|
|||||||
git add action.yml
|
git add action.yml
|
||||||
git commit -m "${tool}"
|
git commit -m "${tool}"
|
||||||
git tag -f "${tool}"
|
git tag -f "${tool}"
|
||||||
git checkout main
|
git checkout refs/tags/"${tag}"
|
||||||
refs+=("+refs/heads/releases/${tool}" "+refs/tags/${tool}")
|
refs+=("+refs/heads/releases/${tool}" "+refs/tags/${tool}")
|
||||||
branches+=("releases/${tool}")
|
branches+=("releases/${tool}")
|
||||||
done
|
done
|
||||||
|
|||||||
2
main.sh
2
main.sh
@@ -763,7 +763,7 @@ for tool in "${tools[@]}"; do
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Handle aliases.
|
# Handle aliases.
|
||||||
# NB: Update alias list in tools/publish.rs, tool input option in test-alias in .github/workflows/ci.yml,
|
# NB: Update alias list in .github/workflows/release.yml, tool input option in test-alias in .github/workflows/ci.yml,
|
||||||
# and match for alias for tools/codegen/src/tools-markdown.rs.
|
# and match for alias for tools/codegen/src/tools-markdown.rs.
|
||||||
# TODO(codegen): auto-detect cases where crate name and tool name are different.
|
# TODO(codegen): auto-detect cases where crate name and tool name are different.
|
||||||
case "${tool}" in
|
case "${tool}" in
|
||||||
|
|||||||
Reference in New Issue
Block a user