-
-
Notifications
You must be signed in to change notification settings - Fork 126
258 lines (223 loc) Β· 9.02 KB
/
Copy pathrelease.yml
File metadata and controls
258 lines (223 loc) Β· 9.02 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
name: Release
on:
push:
branches:
- feat.windows.support
- feat/whisper.migration
- feat/vulkan-support
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g., v0.0.6)'
required: true
type: string
jobs:
build:
name: Build ${{ matrix.os == 'macos' && 'macOS' || 'Windows' }} (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: macos
arch: arm64
runner: macos-latest
- os: macos
arch: x64
runner: macos-15-intel
- os: windows
arch: x64
runner: windows-2025
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Verify architecture
if: matrix.os == 'macos'
run: |
CURRENT_ARCH=$(uname -m)
echo "Current shell architecture: $CURRENT_ARCH"
echo "Target architecture: ${{ matrix.arch }}"
echo "Arch command output: $(arch)"
if [[ "${{ matrix.arch }}" == "x64" ]]; then
if [[ "$CURRENT_ARCH" != "x86_64" ]]; then
echo "ERROR: Expected x86_64 architecture but got $CURRENT_ARCH"
exit 1
fi
echo "β Architecture verified: Running as native x86_64 on Intel hardware"
elif [[ "${{ matrix.arch }}" == "arm64" ]]; then
if [[ "$CURRENT_ARCH" != "arm64" ]]; then
echo "ERROR: Expected arm64 architecture but got $CURRENT_ARCH"
exit 1
fi
echo "β Architecture verified: Running as native arm64"
fi
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.15.0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
# 24.2 to at least 24.6 (atm of writing this) has issues with symlink deref in nested directories
node-version: '24.1.0'
cache: 'pnpm'
- name: Install Vulkan SDK
if: matrix.os == 'windows'
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.3.290.0
cache: true
- name: Log Node.js architecture and platform
run: |
echo "=== Node.js Process Information ==="
node -e "console.log('process.arch:', process.arch)"
node -e "console.log('process.platform:', process.platform)"
echo ""
- name: Install dependencies
env:
GGML_NATIVE: OFF # ensure postinstall builds avoid i8mm on CI runners
run: pnpm install --frozen-lockfile
- name: Build whisper wrapper JS
run: pnpm --filter @amical/whisper-wrapper build
- name: Build whisper native binaries
env:
GGML_NATIVE: OFF # CI mac runners lack i8mm support; keep CPU features conservative here
run: pnpm --filter @amical/whisper-wrapper build:native
- name: Build whisper native binaries (vulkan)
if: matrix.os == 'windows'
env:
GGML_NATIVE: OFF
run: pnpm --filter @amical/whisper-wrapper build:native:vulkan
- name: Download Node.js binaries
working-directory: apps/desktop
run: pnpm download-node
- name: Import Developer ID cert
if: matrix.os == 'macos'
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.DEVELOPER_CERT_BASE64 }}
p12-password: ${{ secrets.DEVELOPER_CERT_PASSPHRASE }}
- name: List signing identities (debug)
if: matrix.os == 'macos'
run: security find-identity -v -p codesigning
- name: Build artifacts (macOS)
if: matrix.os == 'macos'
working-directory: apps/desktop
env:
SKIP_CODESIGNING: false
SKIP_NOTARIZATION: false
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
CODESIGNING_IDENTITY: ${{ secrets.CODESIGNING_IDENTITY }}
POSTHOG_HOST: https://app.posthog.com
TELEMETRY_ENABLED: true
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
FEEDBACK_SURVEY_ID: ${{ secrets.FEEDBACK_SURVEY_ID }}
AUTH_CLIENT_ID: ${{ secrets.AUTH_CLIENT_ID }}
AUTHORIZATION_ENDPOINT: ${{ secrets.AUTHORIZATION_ENDPOINT }}
AUTH_TOKEN_ENDPOINT: ${{ secrets.AUTH_TOKEN_ENDPOINT }}
API_ENDPOINT: ${{ secrets.API_ENDPOINT }}
run: |
echo "Building macOS ${{ matrix.arch }} artifacts"
pnpm make:${{ matrix.arch }}
- name: Build artifacts (Windows)
if: matrix.os == 'windows'
working-directory: apps/desktop
env:
POSTHOG_HOST: https://app.posthog.com
TELEMETRY_ENABLED: true
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
FEEDBACK_SURVEY_ID: ${{ secrets.FEEDBACK_SURVEY_ID }}
AUTH_CLIENT_ID: ${{ secrets.AUTH_CLIENT_ID }}
AUTHORIZATION_ENDPOINT: ${{ secrets.AUTHORIZATION_ENDPOINT }}
AUTH_TOKEN_ENDPOINT: ${{ secrets.AUTH_TOKEN_ENDPOINT }}
API_ENDPOINT: ${{ secrets.API_ENDPOINT }}
run: |
echo "Building Windows x64 artifacts"
pnpm make:windows
- name: Get version from package.json
id: package_version
working-directory: apps/desktop
shell: bash
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Upload artifacts (macOS)
if: matrix.os == 'macos'
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.arch }}
path: |
apps/desktop/out/make/*-${{ matrix.arch }}.dmg
apps/desktop/out/make/zip/darwin/${{ matrix.arch }}/*.zip
- name: Upload artifacts (Windows)
if: matrix.os == 'windows'
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.arch }}
path: |
apps/desktop/out/make/squirrel.windows/${{ matrix.arch }}/*.exe
apps/desktop/out/make/squirrel.windows/${{ matrix.arch }}/*.nupkg
apps/desktop/out/make/squirrel.windows/${{ matrix.arch }}/RELEASES
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get version from package.json
id: package_version
working-directory: apps/desktop
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: List artifacts
run: |
echo "=== Full artifacts directory structure ==="
find artifacts -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.nupkg" -o -name "RELEASES" \) | sort
echo ""
echo "=== Detailed file listing ==="
find artifacts -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.nupkg" -o -name "RELEASES" \) -exec ls -la {} \;
- name: Create Release
uses: softprops/action-gh-release@v2
with:
draft: true
prerelease: true
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
name: Amical Desktop v${{ steps.package_version.outputs.version }}
body: |
## Amical Desktop v${{ steps.package_version.outputs.version }}
### What's New
- Please update this section with actual changes
### Downloads
#### macOS
- **Apple Silicon (M1/M2/M3)**: Download the DMG or ZIP file for arm64
- **Intel**: Download the DMG or ZIP file for x64
#### Windows
- **Windows (x64)**: Download the .exe installer for 64-bit Windows
### Installation
**macOS**:
- **DMG**: Download and open the DMG file, then drag Amical to your Applications folder
- **ZIP**: Download and extract the ZIP file, then drag Amical to your Applications folder
**Windows**:
- Download and run the .exe installer
- Follow the installation wizard
- The app will be installed to your user AppData folder and a shortcut will be created
The ZIP files are primarily for automatic updates. We recommend using the DMG files for initial installation on macOS.
files: |
artifacts/macos-arm64/*.dmg
artifacts/macos-arm64/zip/darwin/arm64/*.zip
artifacts/macos-x64/*.dmg
artifacts/macos-x64/zip/darwin/x64/*.zip
artifacts/windows-x64/*.exe
artifacts/windows-x64/*.nupkg
artifacts/windows-x64/RELEASES
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}