summaryrefslogtreecommitdiff
path: root/act
diff options
context:
space:
mode:
Diffstat (limited to 'act')
-rw-r--r--act/artifacts/readme10
-rw-r--r--act/prerelease.json5
-rw-r--r--act/release.json5
-rwxr-xr-xact/run-act.sh44
4 files changed, 64 insertions, 0 deletions
diff --git a/act/artifacts/readme b/act/artifacts/readme
new file mode 100644
index 00000000..7540e736
--- /dev/null
+++ b/act/artifacts/readme
@@ -0,0 +1,10 @@
+this directory contains artifacts generated by invocations of https://github.com/nektos/act in order to do local testing of binary builds
+
+how to?
+run:
+
+./act/run-act.sh prerelease
+
+or
+
+./act/run-act.sh release
diff --git a/act/prerelease.json b/act/prerelease.json
new file mode 100644
index 00000000..4ef0e8c7
--- /dev/null
+++ b/act/prerelease.json
@@ -0,0 +1,5 @@
+{
+ "inputs": {
+ "release": "prerelease"
+ }
+} \ No newline at end of file
diff --git a/act/release.json b/act/release.json
new file mode 100644
index 00000000..fe400521
--- /dev/null
+++ b/act/release.json
@@ -0,0 +1,5 @@
+{
+ "inputs": {
+ "release": "release"
+ }
+} \ No newline at end of file
diff --git a/act/run-act.sh b/act/run-act.sh
new file mode 100755
index 00000000..71a3d40c
--- /dev/null
+++ b/act/run-act.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+type=$1
+
+oldartifactsdir="old"
+
+parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
+cd "$parent_path"
+
+artifactfolders=$(find artifacts/ -maxdepth 1 -mindepth 1 -type d)
+if [[ ${#artifactfolders[@]} > 0 ]]; then
+ for i in ${artifactfolders[@]}; do
+ foldername=$(dirname $i)
+ subfoldername=$(basename $i)
+ out=$foldername/$oldartifactsdir/$subfoldername-$(date +'%s')
+ if [[ ! "$subfoldername" =~ "$oldartifactsdir" ]]; then
+ mkdir -p $out
+ mv $i $out
+ printf "Moved "${foldername}"/"${subfoldername}" to "${out}" \n"
+ fi
+ done
+fi
+
+cd ..
+
+if [[ "$type" == "release" ]]; then
+ printf "release!\n"
+ act workflow_dispatch -e act/release.json --artifact-server-path act/artifacts
+elif [[ "$type" == "prerelease" ]]; then
+ printf "prerelease!\n"
+ act workflow_dispatch -e act/prerelease.json --artifact-server-path act/artifacts
+else
+ printf "Release type unspecified/badly specified.\n"
+ printf "Options: 'release' or 'prerelease'\n"
+fi
+
+cd act/artifacts
+
+if [[ -d "1" ]]; then
+ cd "1/artifact"
+ cp "PluginLoader.gz__" "PluginLoader.gz"
+ gzip -d "PluginLoader.gz"
+ chmod +x PluginLoader
+fi