fix(release): retain makepkg artifacts outside temp build
Canonicalize the Arch package destination before entering makepkg's temporary directory and pass the workspace output path explicitly from CI.
This commit is contained in:
1 parent
b594047423
commit
0b095e3826
2 files changed
+4
-2
No files matched your search
@@ -77,7 +77,7 @@ jobs:
|
||||
CARGO_BUILD_JOBS=2 cargo build --release --locked
|
||||
./hook/build.sh
|
||||
./capture/build.sh
|
||||
./packaging/build-arch-package.sh dist
|
||||
./packaging/build-arch-package.sh "$1/dist"
|
||||
' _ "$GITHUB_WORKSPACE"
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -4,6 +4,9 @@ set -euo pipefail
|
||||
project_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd -P)
|
||||
version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' "$project_root/Cargo.toml" | head -n1)
|
||||
output=${1:-$project_root/dist}
|
||||
mkdir -p "$output"
|
||||
output=$(cd -- "$output" && pwd -P)
|
||||
readonly output
|
||||
build_dir=$(mktemp -d "${TMPDIR:-/tmp}/uur-makepkg.XXXXXX")
|
||||
trap 'rm -rf -- "$build_dir"' EXIT
|
||||
|
||||
@@ -12,7 +15,6 @@ command -v makepkg >/dev/null 2>&1 || {
|
||||
exit 2
|
||||
}
|
||||
|
||||
mkdir -p "$output"
|
||||
sed -e "s|@UUR_VERSION@|$version|g" \
|
||||
-e "s|@UUR_PROJECT_ROOT@|$project_root|g" \
|
||||
"$project_root/packaging/arch/PKGBUILD.in" >"$build_dir/PKGBUILD"
|
||||
|
||||
Reference in new issue
Block a user