summaryrefslogtreecommitdiff
path: root/save_artifact.sh
diff options
context:
space:
mode:
Diffstat (limited to 'save_artifact.sh')
-rwxr-xr-xsave_artifact.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/save_artifact.sh b/save_artifact.sh
new file mode 100755
index 0000000..e300e6f
--- /dev/null
+++ b/save_artifact.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Usage: ${{ github.workspace }}/save_artifact.sh libsodium "${SODIUM_VERSION}-${{ matrix.host_triplet }}-${SODIUM_HASH}" ${{ github.workspace }}/prefix/lib/libsodium.a
+
+registry_user=mrcyjanek
+cache_name="$1"
+cache_key="$2"
+path_to_file_="$3"
+xz --extreme --keep $path_to_file_
+path_to_file="$3.xz"
+basename="$(basename $path_to_file)"
+curl --user $registry_user:$PAT_SECRET_PACKAGE \
+ --upload-file "$path_to_file" \
+ "https://git.mrcyjanek.net/api/packages/mrcyjanek/generic/monero_c/${cache_name}-${cache_key}/${basename}"
+rm $path_to_file \ No newline at end of file