Merge pull request #361 from bakedPotatoLord/gh-actions

GH Actions
This commit is contained in:
Stewart Allen 2025-05-06 17:14:55 -07:00 committed by GitHub
commit 3442539e20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 80 additions and 0 deletions

52
.github/workflows/build-test.yml vendored Normal file
View file

@ -0,0 +1,52 @@
name: Test Electron App Production Build
on:
# Runs on pushes targeting the default branch
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-ubuntu:
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build Electron app
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npm run build
build-windows:
runs-on: "windows-latest"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build Electron app
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npm run build

27
.github/workflows/prod-test.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: Test NPM Production Build
on:
# Runs on pushes targeting the default branch
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup And Install dependencies
run: npm run setup
- name: dry run production build
run: npm run prod-dryrun

View file

@ -72,6 +72,7 @@
"setup": "npm i && cd mods && npm i",
"dev": "gs-app-server --debug",
"prod": "gs-app-server",
"prod-dryrun": "gs-app-server --dryrun",
"start": "npm run prebuild && electron .",
"start-dev": "npm run prebuild && electron . --devel",
"start-dbg": "npm run prebuild && electron . --debugg",