Skip to content

Commit 29fb151

Browse files
committed
Add download-latest-build target
This target downloads the latest build from GitHub Actions
1 parent 1ca96d6 commit 29fb151

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Plugins/Makefile

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
EMCC ?= emcc
1+
# Android setup
22
ANDROID_NDK_ROOT ?=
3+
# WebGL/Emscripten setup
4+
EMCC ?= emcc
5+
# macOS code signing setup
36
CODESIGN ?= codesign
47
MACOS_CODESIGN_SIGNATURE ?=
8+
# Download GitHub Action releases
9+
GITHUB_CLI_BIN ?= gh
10+
GITHUB_REPO ?= gilzoide/unity-sqlite-net
11+
RUN_ID ?=
512

613
ifeq ($(DEBUG),1)
714
CFLAGS += -O0 -g -DDEBUG
@@ -143,3 +150,14 @@ docker-all-windows:
143150
docker run --rm -v "$(CURDIR)":/src -w /src gilzoide-sqlite-net-build-windows:latest make all-windows-mingw
144151
docker-all-windows-llvm:
145152
docker run --rm -v "$(CURDIR)":/src -w /src mstorsjo/llvm-mingw:latest make all-windows-llvm-mingw
153+
154+
# Download builds from GitHub Actions
155+
download-latest-build:
156+
$(eval TMPDIR := $(shell mktemp -d))
157+
$(GITHUB_CLI_BIN) run download $(RUN_ID) --repo $(GITHUB_REPO) -p gilzoide-sqlite-net-* -D $(TMPDIR)
158+
rsync -r $(TMPDIR)/gilzoide-sqlite-net-windows/* lib/windows/
159+
rsync -r $(TMPDIR)/gilzoide-sqlite-net-linux/* lib/linux/
160+
rsync -r $(TMPDIR)/gilzoide-sqlite-net-android/* lib/android/
161+
rsync -r $(TMPDIR)/gilzoide-sqlite-net-macos/* lib/macos/
162+
rsync -r $(TMPDIR)/gilzoide-sqlite-net-webgl/* lib/webgl/
163+
$(RM) -r $(TMPDIR)

0 commit comments

Comments
 (0)