Skip to content

Commit 6fe8e2a

Browse files
authored
refactor: streamline native asset staging and update release packaging process (#50)
1 parent dbdfdac commit 6fe8e2a

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,27 @@ jobs:
100100
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
101101
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
102102

103+
- name: Stage unique native release assets
104+
run: |
105+
set -euo pipefail
106+
rm -rf build/release-natives
107+
mkdir -p build/release-natives
108+
109+
for platform_dir in build/generated-natives/natives/*; do
110+
if [[ ! -d "$platform_dir" ]]; then
111+
continue
112+
fi
113+
platform="$(basename "$platform_dir")"
114+
115+
for asset in "$platform_dir"/*; do
116+
if [[ ! -f "$asset" ]]; then
117+
continue
118+
fi
119+
base="$(basename "$asset")"
120+
cp "$asset" "build/release-natives/${platform}-${base}"
121+
done
122+
done
123+
103124
- name: Create GitHub Release
104125
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v2.3.2
105126
with:
@@ -111,7 +132,4 @@ jobs:
111132
files: |
112133
build/libs/*.jar
113134
build/pdfium-archives/*.tgz
114-
build/generated-natives/natives/**/*.so
115-
build/generated-natives/natives/**/*.dylib
116-
build/generated-natives/natives/**/*.dll
117-
build/generated-natives/natives/**/native-libs.txt
135+
build/release-natives/*

0 commit comments

Comments
 (0)