-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (116 loc) · 4.21 KB
/
Copy pathbuild.yml
File metadata and controls
134 lines (116 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Build and Release LiventCord App
on:
push:
branches:
- main
workflow_dispatch:
inputs:
app_url:
description: 'Application URL'
required: true
default: 'https://liventcord.koyeb.app/LiventCord/app'
release_version:
description: 'Release Version'
required: true
default: '1.0.1'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js and install Neutralino CLI
run: |
npm install -g @neutralinojs/neu
- name: Create Neutralino.js App
run: |
neu create liventcord
- name: Copy custom icon to resources/icons folder
run: |
cp ./resources/icon.png liventcord/resources/icons/icon.png
- name: Create App.js
run: |
mkdir -p liventcord/src/js
echo "const icon = '/resources/icons/icon.png';" > liventcord/src/js/App.js
echo "await Neutralino.window.setIcon(icon);" >> liventcord/src/js/App.js
echo "await Neutralino.window.open({url: '${{ github.event.inputs.app_url }}', fullscreen: false, width: 800, height: 600, resizable: true});" >> liventcord/src/js/App.js
- name: Update Neutralino Config for External URL and Resources Path
run: |
if [ -f liventcord/neutralino.config.json ]; then
echo '{
"applicationId": "org.liventcord.app",
"defaultMode": "window",
"port": 0,
"url": "${{ github.event.inputs.app_url }}",
"enableServer": false,
"nativeAllowList": [
"app.*",
"os.*",
"debug.log"
],
"globalVariables": {},
"cli": {
"binaryName": "liventcord",
"resourcesPath": "/resources",
"extensionsPath": "/extensions",
"distributionPath": "dist"
},
"modes": {
"window": {
"title": "LiventCord",
"width": 800,
"height": 600,
"resizable": true,
"fullscreen": false
}
}
}' > liventcord/neutralino.config.json
else
echo "neutralino.config.json not found!"
exit 1
fi
- name: Build App
run: |
cd liventcord
neu build --release
- name: Set executable permissions for binaries
run: |
chmod +x liventcord/dist/liventcord/*
- name: Create zip files for each platform
run: |
cd liventcord/dist/liventcord
zip liventcord-linux_arm64.zip liventcord-linux_arm64 resources.neu
zip liventcord-linux_armhf.zip liventcord-linux_armhf resources.neu
zip liventcord-linux_x64.zip liventcord-linux_x64 resources.neu
zip liventcord-mac_arm64.zip liventcord-mac_arm64 resources.neu
zip liventcord-mac_universal.zip liventcord-mac_universal resources.neu
zip liventcord-mac_x64.zip liventcord-mac_x64 resources.neu
zip liventcord-win_x64.exe.zip liventcord-win_x64.exe resources.neu
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: liventcord-zips
path: liventcord/dist/liventcord/*.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: liventcord-zips
- name: List files to check if zips are present
run: |
ls -l
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.event.inputs.release_version }}
name: Release v${{ github.event.inputs.release_version }}
body: "Release of the LiventCord webview app"
files: ./*.zip
token: ${{ secrets.GITHUB_TOKEN }}