Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Added experimental automatic builds workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
OrigamingWasTaken committed Jan 27, 2024
1 parent 32d4ee7 commit b6b3f58
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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_*
9 changes: 8 additions & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion building/patch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# This file patches some dev environement things

sed -i '' 's/http:\/\/localhost:[0-9]*//g' svelte/index.html
sed -i '' 's/http:\/\/localhost:[0-9]*//g' svelte/index.html
echo -e "\x1b[32;1mPatched 'svelte/index.html\x1b[0m'"
rm -rf dist/*
2 changes: 1 addition & 1 deletion neutralino.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"buildScript": {
"mac": {
"architecture": ["x64", "arm64", "universal"],
"architecture": ["universal"],
"minimumOS": "10.13.0",
"appName": "AutoEvent",
"appBundleName": "AutoEvent",
Expand Down

0 comments on commit b6b3f58

Please sign in to comment.