From b6b3f5861d17a5137da3cebfd59274f30a275380 Mon Sep 17 00:00:00 2001 From: OrigamingWasTaken <74014262+OrigamingWasTaken@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:44:25 +0100 Subject: [PATCH] Added experimental automatic builds workflow --- .github/workflows/build.yml | 43 +++++++++++++++++++++++++++++++++++++ build | 9 +++++++- building/patch.sh | 4 +++- neutralino.config.json | 2 +- 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bdecef7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build App + +on: + push: + branches: + - main # Change this to your main branch name + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 14 + + - name: Install Dependencies + run: npm install # Adjust this based on your project's dependencies + + - name: Build for Mac + run: ./build mac + + - name: Build for Linux + run: ./build linux + + - name: Build for Windows + run: ./build win + + - name: Build for All Platforms + run: ./build all + + - name: Archive Artifacts + uses: actions/upload-artifact@v2 + with: + name: builds + path: | + dist/mac_* + dist/linux_* + dist/win_* diff --git a/build b/build index 21be9b6..b7c87de 100755 --- a/build +++ b/build @@ -2,11 +2,12 @@ # Function to display help message show_help() { - echo "Usage: $0 [mac|linux|win]" + echo "Usage: $0 [mac|linux|win|all]" echo "Execute the script based on the provided argument." echo " mac Build app for Mac" echo " linux Build app for linux" echo " win Build app for windows" + echo " all Build app for all platforms" } # Check if no arguments are provided @@ -36,6 +37,12 @@ case $1 in ./building/patch.sh ./building/build-win.sh ;; + all) + ./building/patch.sh + ./building/build-mac.sh + ./building/build-win.sh + ./building/build-linux.sh + ;; *) echo "Error: Invalid argument. Please use 'mac', 'linux', or 'win'." show_help diff --git a/building/patch.sh b/building/patch.sh index c4631ab..a407815 100755 --- a/building/patch.sh +++ b/building/patch.sh @@ -1,4 +1,6 @@ #!/bin/bash # This file patches some dev environement things -sed -i '' 's/http:\/\/localhost:[0-9]*//g' svelte/index.html \ No newline at end of file +sed -i '' 's/http:\/\/localhost:[0-9]*//g' svelte/index.html +echo -e "\x1b[32;1mPatched 'svelte/index.html\x1b[0m'" +rm -rf dist/* \ No newline at end of file diff --git a/neutralino.config.json b/neutralino.config.json index f44bbdc..70b977e 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -40,7 +40,7 @@ }, "buildScript": { "mac": { - "architecture": ["x64", "arm64", "universal"], + "architecture": ["universal"], "minimumOS": "10.13.0", "appName": "AutoEvent", "appBundleName": "AutoEvent",