Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
20055ca0
authored
Oct 03, 2025
by
bubblepipe42
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
action
parent
f50ca4fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
0 deletions
+104
-0
.github/workflows/electron-build.yml
+104
-0
No files found.
.github/workflows/electron-build.yml
0 → 100644
View file @
20055ca0
name
:
Build Electron App
on
:
push
:
tags
:
-
'
v*.*.*'
# Triggers on version tags like v1.0.0
workflow_dispatch
:
# Allows manual triggering
jobs
:
build
:
strategy
:
matrix
:
os
:
[
macos-latest
,
windows-latest
]
runs-on
:
${{ matrix.os }}
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v4
-
name
:
Setup Node.js
uses
:
actions/setup-node@v4
with
:
node-version
:
'
20'
-
name
:
Setup Go
uses
:
actions/setup-go@v5
with
:
go-version
:
'
1.21'
-
name
:
Build frontend
run
:
|
cd web
npm install --legacy-peer-deps
npm run build
env
:
DISABLE_ESLINT_PLUGIN
:
'
true'
-
name
:
Build Go binary (darwin/Linux)
if
:
runner.os != 'Windows'
run
:
|
go build -ldflags="-s -w" -o new-api
-
name
:
Build Go binary (Windows)
if
:
runner.os == 'Windows'
run
:
|
go build -ldflags="-s -w" -o new-api.exe
-
name
:
Install Electron dependencies
run
:
|
cd electron
npm install
-
name
:
Build Electron app (macOS)
if
:
runner.os == 'macOS'
run
:
|
cd electron
npm run build:mac
env
:
CSC_IDENTITY_AUTO_DISCOVERY
:
false
# Skip code signing
-
name
:
Build Electron app (Windows)
if
:
runner.os == 'Windows'
run
:
|
cd electron
npm run build:win
-
name
:
Upload artifacts (macOS)
if
:
runner.os == 'macOS'
uses
:
actions/upload-artifact@v4
with
:
name
:
darwin-build
path
:
|
electron/dist/*.dmg
electron/dist/*.zip
-
name
:
Upload artifacts (Windows)
if
:
runner.os == 'Windows'
uses
:
actions/upload-artifact@v4
with
:
name
:
windows-build
path
:
|
electron/dist/*.exe
release
:
needs
:
build
runs-on
:
ubuntu-latest
if
:
startsWith(github.ref, 'refs/tags/')
steps
:
-
name
:
Download all artifacts
uses
:
actions/download-artifact@v4
-
name
:
Create Release
uses
:
softprops/action-gh-release@v1
with
:
files
:
|
darwin-build/*
windows-build/*
draft
:
false
prerelease
:
false
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment