From b68764c9e196660d5f9268023081093f42e11251 Mon Sep 17 00:00:00 2001 From: O3H Date: Sun, 6 Oct 2024 17:14:57 +0100 Subject: [PATCH] add back wails.json --- .github/workflows/build.yml | 9 +++---- .github/workflows/test.yml | 47 +++++++++++++++++++++++++++++++++++++ wails.json | 14 +++++++++++ 3 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 wails.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b7f4567..fac5184 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,8 +29,8 @@ jobs: fail-fast: false matrix: build: [ - { name: "modm8", platform: "linux/amd64", os: "ubuntu-latest" }, { name: "modm8.exe", platform: "windows/amd64", os: "windows-latest" }, + { name: "modm8", platform: "linux/amd64", os: "ubuntu-latest" }, { name: "modm8", platform: "darwin/universal", os: "macos-latest" } ] @@ -45,10 +45,11 @@ jobs: uses: The-Egg-Corp/wails-build-action@v1.4 id: build with: - build-name: ${{ matrix.build.name }} - build-platform: ${{ matrix.build.platform }} + #name: "modm8" go-version: '1.22.1' node-version: 20 setup-bun: true + build-name: ${{ matrix.build.name }} + build-platform: ${{ matrix.build.platform }} nsis: ${{ inputs.nsis }} - package: ${{ inputs.package }} \ No newline at end of file + package: ${{ inputs.package }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..df47524 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +name: Test Action +on: + # Allows workflow to be manually triggered. + workflow_dispatch: + inputs: + logLevel: + description: "Log level" + required: true + type: choice + options: [info, warning, debug] + default: "warning" + +jobs: + build: + strategy: + fail-fast: false + matrix: + build: [ + { name: "modm8.exe", platform: "windows/amd64", os: "windows-latest" }, + { name: "modm8", platform: "linux/amd64", os: "ubuntu-latest" }, + { name: "modm8", platform: "darwin/universal", os: "macos-latest" } + ] + + runs-on: ${{ matrix.build.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Verify wails.json exists + run: | + if [ ! -f ./wails.json ]; then + echo "Error: wails.json not found in the root directory!" + exit 1 + fi + + - name: Read outputfilename from wails.json using jq + run: | + OUTPUT_FILENAME=$(jq -r '.outputfilename' ./wails.json) + + if [ -z "$OUTPUT_FILENAME" ]; then + echo "Error: outputfilename key not found or empty in wails.json!" + exit 1 + fi + + echo "Output file name: $OUTPUT_FILENAME" \ No newline at end of file diff --git a/wails.json b/wails.json new file mode 100644 index 0000000..0d3f3c0 --- /dev/null +++ b/wails.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://wails.io/schemas/config.v2.json", + "name": "modm8", + "outputfilename": "modm8", + "author": { + "name": "Owen3H", + "email": "the-egg-corp@protonmail.com" + }, + "frontend:install": "bun install", + "frontend:build": "bun run build", + "frontend:dev:watcher": "bun run dev", + "frontend:dev:serverUrl": "auto", + "debounceMS": 120 +} \ No newline at end of file