ci: respect GITHUB_REPOSITORY + tolerate per-asset upload failures
release / release (push) Successful in 5s
release / release (push) Successful in 5s
This commit is contained in:
+12
-1
@@ -6,12 +6,23 @@
|
||||
# - Always archives HEAD, so the working tree state is irrelevant.
|
||||
# - If more than one addon folder is present, also emits <repo>-all.zip
|
||||
# with every addon folder side-by-side at the zip root.
|
||||
# - When run inside Gitea Actions the working tree lives under a
|
||||
# per-job dir like /var/lib/act_runner/work/.../hostexecutor, so the
|
||||
# repo name comes from $GITHUB_REPOSITORY (set by the runner) and
|
||||
# only falls back to the toplevel basename for local invocations.
|
||||
set -euo pipefail
|
||||
|
||||
root=$(git rev-parse --show-toplevel)
|
||||
cd "$root"
|
||||
|
||||
repo_name=$(basename "$root")
|
||||
# Gitea Actions sets GITHUB_REPOSITORY=owner/repo. The basename of
|
||||
# `git rev-parse --show-toplevel` inside the runner is the worker dir
|
||||
# (e.g. `hostexecutor`), which would name the bundle wrong.
|
||||
if [ -n "${GITHUB_REPOSITORY:-}" ]; then
|
||||
repo_name="${GITHUB_REPOSITORY##*/}"
|
||||
else
|
||||
repo_name=$(basename "$root")
|
||||
fi
|
||||
dist="$root/dist"
|
||||
|
||||
# Find Foo/Foo.toc pairs at depth 1; ignore libs nested deeper.
|
||||
|
||||
Reference in New Issue
Block a user