-
-
Notifications
You must be signed in to change notification settings - Fork 26
199 lines (157 loc) · 5.8 KB
/
Copy pathrelease.yml
File metadata and controls
199 lines (157 loc) · 5.8 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: Loopi Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-windows:
name: Build Windows packages
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Enable Corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build Windows packages
run: pnpm run make
- name: Upload Windows artifacts
uses: actions/upload-artifact@v5
with:
name: dist-windows
path: |
out/**
dist/**
build-linux:
name: Build Linux packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Enable Corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build Linux packages
run: pnpm run make
- name: Upload Linux artifacts
uses: actions/upload-artifact@v5
with:
name: dist-linux
path: |
out/**
dist/**
create_release:
name: Create GitHub Release with all artifacts
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Download Windows artifacts
uses: actions/download-artifact@v5
with:
name: dist-windows
path: artifacts/windows
- name: Download Linux artifacts
uses: actions/download-artifact@v5
with:
name: dist-linux
path: artifacts/linux
- name: List and calculate file sizes
run: |
echo "=== Windows Artifacts ==="
find artifacts/windows -type f -name "*.exe" | sort
echo "=== Linux Artifacts ==="
find artifacts/linux -type f -name "*.deb" | sort
- name: Generate Release Notes with Dynamic File Sizes
run: |
# Function to format file size with decimals
format_size() {
local size=$1
if (( size < 1024 )); then
echo "${size} B"
elif (( size < 1048576 )); then
printf "%.1f KB\n" "$(echo "scale=1; $size / 1024" | bc)"
else
printf "%.1f MB\n" "$(echo "scale=1; $size / 1048576" | bc)"
fi
}
# Get Windows exe size (Setup.exe is the actual installer)
WIN_EXE=$(find artifacts/windows -type f -name "*Setup.exe" -printf '%s\n' | sort -rn | head -1)
if [ -z "$WIN_EXE" ]; then
WIN_SIZE="Unknown"
else
WIN_SIZE=$(format_size $WIN_EXE)
fi
# Get Linux deb size (latest/largest deb file)
LINUX_DEB=$(find artifacts/linux -type f -name "*.deb" -printf '%s\n' | sort -rn | head -1)
if [ -z "$LINUX_DEB" ]; then
LINUX_SIZE="Unknown"
else
LINUX_SIZE=$(format_size $LINUX_DEB)
fi
cat > release_notes.md << EOF
# Loopi ${{ github.ref_name }}
Download the installer for your operating system below.
## 🪟 Windows (Windows 10 or later, 64-bit)
- **Installer (.exe)** - ${WIN_SIZE} - Recommended for most users
## 🐧 Linux (Ubuntu 20.04+, Debian 11+, or equivalent)
- **Debian Package (.deb)** - ${LINUX_SIZE} - For Ubuntu, Debian, and derivatives
## 📋 System Requirements
### Windows
- Windows 10 or later (64-bit)
- 4 GB RAM minimum
- 500 MB free disk space
### Linux
- Ubuntu 20.04+, Debian 11+, or equivalent
- 4 GB RAM minimum
- 500 MB free disk space
## 🚀 Getting Started
1. Download the installer for your operating system
2. Run the installer and follow the setup wizard
3. Launch Loopi and create your first automation
## 📖 Documentation
- [README](https://github.com/Dyan-Dev/loopi/tree/feature/docs)
- [Getting Started Guide](https://github.com/Dyan-Dev/loopi/blob/feature/docs/GETTING_STARTED.md)
- [Variable System](https://github.com/Dyan-Dev/loopi/blob/feature/docs/VARIABLES.md)
- [Architecture](https://github.com/Dyan-Dev/loopi/blob/feature/docs/ARCHITECTURE.md)
## 🐛 Bug Reports
Found a bug? Please [open an issue](https://github.com/Dyan-Dev/loopi/issues) with:
- Your operating system and version
- Steps to reproduce
- Expected vs actual behavior
- Screenshots/logs if applicable
## 💬 Support
For questions or support, please:
- Check [existing issues](https://github.com/Dyan-Dev/loopi/issues)
- Email: support@dyan.live
---
Thank you for using Loopi! 🎉
EOF
echo "Release notes generated"
- name: Create GitHub Release and upload assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Loopi ${{ github.ref_name }}
body_path: release_notes.md
draft: false
files: |
artifacts/windows/out/**/*.exe
artifacts/linux/out/**/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}