Skip to content

Commit b6bb457

Browse files
committed
ci/docs: add reusable packages workflow and mux server docs
1 parent cb9bdaf commit b6bb457

File tree

3 files changed

+140
-112
lines changed

3 files changed

+140
-112
lines changed

.github/workflows/build.yml

Lines changed: 114 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,32 @@ on:
44
pull_request:
55
branches: ["**"]
66
merge_group:
7-
workflow_dispatch: # Allow manual triggering
7+
workflow_dispatch:
8+
workflow_call:
9+
inputs:
10+
release_tag:
11+
description: 'Release tag name (required when publishing)'
12+
required: false
13+
type: string
14+
secrets:
15+
MACOS_CERTIFICATE:
16+
required: false
17+
MACOS_CERTIFICATE_PWD:
18+
required: false
19+
AC_APIKEY_P8_BASE64:
20+
required: false
21+
AC_APIKEY_ID:
22+
required: false
23+
AC_APIKEY_ISSUER_ID:
24+
required: false
25+
GH_TOKEN:
26+
required: false
27+
VSCE_PAT:
28+
required: false
829

930
jobs:
10-
build-macos:
11-
name: Build macOS
31+
macos:
32+
name: ${{ github.event_name == 'workflow_call' && 'Build and Release macOS' || 'Build macOS' }}
1233
runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-15' || 'macos-latest' }}
1334
steps:
1435
- name: Checkout code
@@ -28,6 +49,7 @@ jobs:
2849
AC_APIKEY_ISSUER_ID: ${{ secrets.AC_APIKEY_ISSUER_ID }}
2950

3051
- name: Verify signing setup
52+
if: github.event_name != 'workflow_call'
3153
run: |
3254
if [ -n "${CSC_LINK:-}" ]; then
3355
echo "✅ Code signing enabled"
@@ -38,11 +60,13 @@ jobs:
3860
fi
3961
4062
- name: Package for macOS
63+
if: github.event_name != 'workflow_call'
4164
run: make dist-mac
4265
env:
4366
CSC_FOR_PULL_REQUEST: ${{ github.event.pull_request.number == 234 }}
4467

4568
- name: Upload macOS DMG (x64)
69+
if: github.event_name != 'workflow_call'
4670
uses: actions/upload-artifact@v4
4771
with:
4872
name: macos-dmg-x64
@@ -51,15 +75,22 @@ jobs:
5175
if-no-files-found: error
5276

5377
- name: Upload macOS DMG (arm64)
78+
if: github.event_name != 'workflow_call'
5479
uses: actions/upload-artifact@v4
5580
with:
5681
name: macos-dmg-arm64
5782
path: release/*-arm64.dmg
5883
retention-days: 30
5984
if-no-files-found: error
6085

61-
build-linux:
62-
name: Build Linux
86+
- name: Package and publish for macOS
87+
if: github.event_name == 'workflow_call'
88+
run: make dist-mac-release
89+
env:
90+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
91+
92+
linux:
93+
name: ${{ github.event_name == 'workflow_call' && 'Build and Release Linux' || 'Build Linux' }}
6394
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
6495
steps:
6596
- name: Checkout code
@@ -73,18 +104,72 @@ jobs:
73104
run: bun run build
74105

75106
- name: Package for Linux
107+
if: github.event_name != 'workflow_call'
76108
run: make dist-linux
77109

78110
- name: Upload Linux AppImage
111+
if: github.event_name != 'workflow_call'
79112
uses: actions/upload-artifact@v4
80113
with:
81114
name: linux-appimage
82115
path: release/*.AppImage
83116
retention-days: 30
84117
if-no-files-found: error
85118

86-
build-vscode-extension:
87-
name: Build VS Code Extension
119+
- name: Package and publish for Linux
120+
if: github.event_name == 'workflow_call'
121+
run: bun x electron-builder --linux --publish always
122+
env:
123+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
124+
125+
windows:
126+
name: ${{ github.event_name == 'workflow_call' && 'Build and Release Windows' || 'Build Windows' }}
127+
runs-on: windows-latest
128+
steps:
129+
- name: Checkout code
130+
uses: actions/checkout@v4
131+
with:
132+
fetch-depth: 0 # Required for git describe to find tags
133+
134+
- uses: ./.github/actions/setup-mux
135+
136+
- name: Install GNU Make (for build)
137+
run: choco install -y make
138+
139+
- name: Verify tools
140+
shell: bash
141+
run: |
142+
make --version
143+
bun --version
144+
magick --version | head -1
145+
146+
- name: Build application
147+
shell: pwsh
148+
run: bun run build
149+
150+
- name: Package for Windows (.exe)
151+
if: github.event_name != 'workflow_call'
152+
shell: pwsh
153+
run: make dist-win
154+
155+
- name: Upload Windows installer (.exe)
156+
if: github.event_name != 'workflow_call'
157+
uses: actions/upload-artifact@v4
158+
with:
159+
name: windows-installer
160+
path: release/*.exe
161+
retention-days: 30
162+
if-no-files-found: error
163+
164+
- name: Package and publish for Windows (.exe)
165+
if: github.event_name == 'workflow_call'
166+
shell: pwsh
167+
run: bun x electron-builder --win --publish always
168+
env:
169+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
170+
171+
vscode-extension:
172+
name: ${{ github.event_name == 'workflow_call' && 'Build and Publish VS Code Extension' || 'Build VS Code Extension' }}
88173
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
89174
steps:
90175
- name: Checkout code
@@ -97,9 +182,31 @@ jobs:
97182
- uses: ./.github/actions/build-vscode-extension
98183

99184
- name: Upload VS Code extension artifact
185+
if: github.event_name != 'workflow_call'
100186
uses: actions/upload-artifact@v4
101187
with:
102188
name: vscode-extension
103189
path: vscode/mux-*.vsix
104190
retention-days: 30
105191
if-no-files-found: error
192+
193+
- name: Upload VS Code extension to release
194+
if: github.event_name == 'workflow_call'
195+
env:
196+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
197+
run: |
198+
if [ -z "${{ inputs.release_tag }}" ]; then
199+
echo "release_tag input is required when publishing"
200+
exit 1
201+
fi
202+
gh release upload "${{ inputs.release_tag }}" \
203+
vscode/mux-*.vsix \
204+
--clobber
205+
206+
- name: Publish to VS Code Marketplace
207+
if: github.event_name == 'workflow_call' && secrets.VSCE_PAT != ''
208+
working-directory: vscode
209+
env:
210+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
211+
run: |
212+
bunx vsce publish -p $VSCE_PAT

.github/workflows/release.yml

Lines changed: 6 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -8,107 +8,9 @@ permissions:
88
contents: write # Required for electron-builder to upload release assets
99

1010
jobs:
11-
build-macos:
12-
name: Build and Release macOS
13-
runs-on: ${{ github.repository_owner == 'coder' && 'depot-macos-15' || 'macos-latest' }}
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 0 # Required for git describe to find tags
19-
20-
- uses: ./.github/actions/setup-mux
21-
22-
- name: Build application
23-
run: bun run build
24-
25-
- name: Setup code signing
26-
run: ./scripts/setup-macos-signing.sh
27-
env:
28-
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
29-
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
30-
AC_APIKEY_P8_BASE64: ${{ secrets.AC_APIKEY_P8_BASE64 }}
31-
AC_APIKEY_ID: ${{ secrets.AC_APIKEY_ID }}
32-
AC_APIKEY_ISSUER_ID: ${{ secrets.AC_APIKEY_ISSUER_ID }}
33-
34-
- name: Package and publish for macOS
35-
run: make dist-mac-release
36-
env:
37-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
39-
build-linux:
40-
name: Build and Release Linux
41-
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
42-
steps:
43-
- name: Checkout code
44-
uses: actions/checkout@v4
45-
with:
46-
fetch-depth: 0 # Required for git describe to find tags
47-
48-
- uses: ./.github/actions/setup-mux
49-
50-
- name: Build application
51-
run: bun run build
52-
53-
- name: Package and publish for Linux
54-
run: bun x electron-builder --linux --publish always
55-
env:
56-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
58-
build-vscode-extension:
59-
name: Build and Release VS Code Extension
60-
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
61-
steps:
62-
- name: Checkout code
63-
uses: actions/checkout@v4
64-
with:
65-
fetch-depth: 0 # Required for git describe to find tags
66-
67-
- uses: ./.github/actions/setup-mux
68-
69-
- uses: ./.github/actions/build-vscode-extension
70-
71-
- name: Upload VS Code extension to release
72-
env:
73-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74-
run: |
75-
gh release upload ${{ github.event.release.tag_name }} \
76-
vscode/mux-*.vsix \
77-
--clobber
78-
79-
- name: Publish to VS Code Marketplace
80-
if: secrets.VSCE_PAT != ''
81-
working-directory: vscode
82-
env:
83-
VSCE_PAT: ${{ secrets.VSCE_PAT }}
84-
run: |
85-
bunx vsce publish -p $VSCE_PAT
86-
87-
build-windows:
88-
name: Build and Release Windows
89-
runs-on: windows-latest
90-
steps:
91-
- name: Checkout code
92-
uses: actions/checkout@v4
93-
with:
94-
fetch-depth: 0 # Required for git describe to find tags
95-
96-
- uses: ./.github/actions/setup-mux
97-
98-
- name: Install GNU Make (for build)
99-
run: choco install -y make
100-
101-
- name: Verify tools
102-
shell: bash
103-
run: |
104-
make --version
105-
bun --version
106-
magick --version | head -1
107-
108-
- name: Build application
109-
run: bun run build
110-
111-
- name: Package and publish for Windows (.exe)
112-
run: bun x electron-builder --win --publish always
113-
env:
114-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
publish-artifacts:
12+
name: Release desktop + extension artifacts
13+
uses: ./.github/workflows/build.yml
14+
with:
15+
release_tag: ${{ github.event.release.tag_name }}
16+
secrets: inherit

docs/install.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ Download pre-built binaries from [the releases page](https://github.com/coder/mu
88

99
- **macOS**: Signed and notarized DMG (separate builds for Intel/Apple Silicon)
1010
- **Linux**: AppImage
11+
- **Windows**: Signed installer (.exe)
1112

1213
### Development Builds
1314

14-
Down pre-built binaries of `main` from [GitHub Actions](https://github.com/coder/mux/actions/workflows/build.yml):
15+
Download pre-built binaries of `main` from [GitHub Actions](https://github.com/coder/mux/actions/workflows/build.yml):
1516

1617
- **macOS**: Signed and notarized DMG
1718
- `macos-dmg-x64` (Intel Macs)
1819
- `macos-dmg-arm64` (Apple Silicon)
1920
- **Linux**: AppImage (portable, works on most distros)
21+
- **Windows**: Installer (.exe) – artifact `windows-installer`
2022

2123
To download:
2224

@@ -38,12 +40,29 @@ To download:
3840

3941
The app is code-signed and notarized by Apple, so it will open without security warnings.
4042

43+
**Windows:**
44+
45+
1. Download the `.exe` installer from the release page or the `windows-installer` artifact.
46+
2. Double-click the installer and follow the prompts. The installer places Mux in `%LOCALAPPDATA%\Programs\mux` and adds a Start Menu entry.
47+
3. If SmartScreen warns about the binary (common for unsigned preview builds), click **More info****Run anyway**.
48+
4. Launch Mux from the Start Menu or run `mux.exe --server` from PowerShell to start the browser-accessible server mode directly.
49+
4150
**Linux:**
4251

4352
1. Download the AppImage file
4453
2. Make it executable: `chmod +x Mux-*.AppImage`
4554
3. Run it: `./Mux-*.AppImage`
4655

56+
### Running Mux in server mode
57+
58+
Mux includes a lightweight server mode so you can keep the agent running without the desktop shell and reach it from any browser (desktop, tablet, or phone). After installing, run `mux --server` (or `mux.exe --server` on Windows) to start an HTTP/WebSocket control plane.
59+
60+
- The server hosts the full Mux UI over the web and prints a URL such as `http://localhost:3000`. Open that URL from the same machine, or expose it via a tunnel/VPN to reach it from mobile devices.
61+
- Use `--host 0.0.0.0` to bind to all interfaces and `--port <number>` to pick a different port.
62+
- Pass `--add-project /path/to/repo` to register and auto-open a workspace when the browser connects.
63+
64+
This mode is ideal for mobile development: keep the heavy Electron app on a workstation, run `mux --server`, and interact with the session from your phone or tablet browser.
65+
4766
### Testing Pre-Release Builds
4867

4968
⚠️ **Note**: Only builds from the `main` branch are signed and notarized. If you're testing a build from a pull request or other branch, you'll need to bypass macOS Gatekeeper:

0 commit comments

Comments
 (0)