diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml deleted file mode 100644 index 3b1e9f2..0000000 --- a/.github/workflows/deployment.yml +++ /dev/null @@ -1,29 +0,0 @@ -on: - release: - types: [created] - workflow_dispatch: - -jobs: - release: - name: release ${{ matrix.target }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - target: x86_64-pc-windows-gnu - archive: zip - - target: x86_64-unknown-linux-musl - archive: tar.gz tar.xz tar.zst - - target: x86_64-apple-darwin - archive: zip - steps: - - uses: actions/checkout@master - - name: Compile and release - uses: rust-build/rust-build.action@v1.4.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - RUSTTARGET: ${{ matrix.target }} - ARCHIVE_TYPES: ${{ matrix.archive }} - EXTRA_FILES: "README.md LICENSE" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1f6f8ec --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 QueenOfSquiggles + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/build_release.sh b/build_release.sh new file mode 100755 index 0000000..584809d --- /dev/null +++ b/build_release.sh @@ -0,0 +1,125 @@ +#! /usr/bin/bash + +echo "Building artifacts for Squiggles Core" + +spinner() +{ + # function taken from https://stackoverflow.com/a/20369590 + local pid=$! + local delay=0.25 + local spinstr='|/-\' + while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do + local temp=${spinstr#?} + printf " [%c] " "$spinstr" + local spinstr=$temp${spinstr%"$temp"} + sleep $delay + printf "\b\b\b\b\b\b" + done + printf " \b\b\b\b" +} + +echo "Verifying target installation" + +echo "Ensuring docker is currently running" +dockerd &> /dev/null + + +echo "Building targets (this are containerized and may take a while UwU)" + +echo " - Linux x86 64 Debug" +cross build -q --target=x86_64-unknown-linux-gnu \ + > /dev/null \ + & spinner +echo " Done" + +echo " - Linux x86 64 Release" +cross build -q -r --target=x86_64-unknown-linux-gnu \ + > /dev/null \ + & spinner +echo " Done" + +echo " - Windows x64 Debug" +cross build -q --target=x86_64-pc-windows-gnu \ + > /dev/null \ + & spinner +echo " Done" + +echo " - Windows x64 Release" +cross build -q -r --target=x86_64-pc-windows-gnu \ + > /dev/null \ + & spinner +echo " Done" + +echo " - Mac Debug" +cross build -q --target=x86_64-apple-darwin \ + > /dev/null \ + & spinner +echo " Done" + +echo " - Mac Release" +cross build -q -r --target=x86_64-apple-darwin \ + > /dev/null \ + & spinner +echo " Done" + +echo "All builds complete" +echo "---" + +## +## +## + +# make folder +echo "Making folders" +mkdir addons +mkdir addons/squiggles_core +mkdir addons/squiggles_core/target +mkdir addons/squiggles_core/target/debug +mkdir addons/squiggles_core/target/release + +echo "Copying files over" + +# metadata +cp README.md addons/squiggles_core/README.md +cp LICENSE addons/squiggles_core/LICENSE +cp squiggles_core.gdextension addons/squiggles_core/squiggles_core.gdextension + +# Windows libraries + +cp target/x86_64-pc-windows-gnu/debug/squiggles_core.dll \ + addons/squiggles_core/target/debug/squiggles_core.dll + +cp target/x86_64-pc-windows-gnu/release/squiggles_core.dll \ + addons/squiggles_core/target/release/squiggles_core.dll + +# Linux libraries +cp target/x86_64-unknown-linux-gnu/debug/libsquiggles_core.so \ + addons/squiggles_core/target/debug/libsquiggles_core.so + +cp target/x86_64-unknown-linux-gnu/release/libsquiggles_core.so \ + addons/squiggles_core/target/release/libsquiggles_core.so + +# Mac libraries +cp target/x86_64-apple-darwin/debug/libsquiggles_core.dylib \ + addons/squiggles_core/target/debug/libsquiggles_core.dylib + +cp target/x86_64-apple-darwin/release/libsquiggles_core.dylib \ + addons/squiggles_core/target/release/libsquiggles_core.dylib + +echo "Copying folders over" + +# static files folders +cp -r scenes addons/squiggles_core/scenes/ +cp -r assets addons/squiggles_core/assets/ + +echo "Creating zip archive" +zip -r -q squiggles_core_release addons && rm -r addons/ + +echo "Your archive should be in this directory as 'squiggles_core_release.zip'" + + + + + + + diff --git a/squiggles_core_release.zip b/squiggles_core_release.zip new file mode 100644 index 0000000..7df15ea Binary files /dev/null and b/squiggles_core_release.zip differ