Skip to content

Commit ab94337

Browse files
committed
Merge branch 'feat/macos-windows-installs' into dev
macOS Homebrew cask (tap voltiusapp/voltius) + Windows winget (komac → winget-pkgs PR #389008), auto-published on release. README install docs.
2 parents 427dadf + f6ee7e8 commit ab94337

5 files changed

Lines changed: 247 additions & 2 deletions

File tree

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Publishes the Homebrew cask (tap VoltiusApp/homebrew-voltius) and the winget
2+
# manifest (microsoft/winget-pkgs) from a published GitHub release.
3+
#
4+
# Required repository secrets:
5+
# HOMEBREW_TAP_TOKEN PAT with push access to VoltiusApp/homebrew-voltius
6+
# WINGET_PKGS_TOKEN classic PAT (public_repo) for komac to fork winget-pkgs
7+
name: publish-installers
8+
9+
on:
10+
release:
11+
types: [published]
12+
workflow_dispatch:
13+
inputs:
14+
tag:
15+
description: 'Release tag to publish (e.g. v0.4.0)'
16+
required: true
17+
type: string
18+
19+
concurrency:
20+
group: publish-installers
21+
cancel-in-progress: false
22+
23+
jobs:
24+
homebrew:
25+
runs-on: macos-latest
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v6
29+
30+
- name: Resolve tag
31+
id: tag
32+
env:
33+
DISPATCH_TAG: ${{ inputs.tag }}
34+
RELEASE_TAG: ${{ github.event.release.tag_name }}
35+
run: echo "tag=${DISPATCH_TAG:-$RELEASE_TAG}" >> "$GITHUB_OUTPUT"
36+
37+
- name: Generate cask
38+
env:
39+
GH_TOKEN: ${{ github.token }}
40+
run: |
41+
mkdir -p out/Casks
42+
bash scripts/gen-homebrew-cask.sh "${{ steps.tag.outputs.tag }}" > out/Casks/voltius.rb
43+
cat out/Casks/voltius.rb
44+
45+
- name: Audit cask
46+
run: |
47+
brew style out/Casks/voltius.rb
48+
brew tap-new voltiusapp/voltius --no-git
49+
mkdir -p "$(brew --repository voltiusapp/voltius)/Casks"
50+
cp out/Casks/voltius.rb "$(brew --repository voltiusapp/voltius)/Casks/voltius.rb"
51+
brew audit --cask --online voltiusapp/voltius/voltius
52+
53+
- name: Push cask to tap
54+
env:
55+
TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
56+
TAG: ${{ steps.tag.outputs.tag }}
57+
run: |
58+
git clone "https://x-access-token:${TAP_TOKEN}@github.com/VoltiusApp/homebrew-voltius" tap
59+
mkdir -p tap/Casks
60+
cp out/Casks/voltius.rb tap/Casks/voltius.rb
61+
cd tap
62+
if git diff --quiet; then
63+
echo "Cask already up to date for ${TAG}"; exit 0
64+
fi
65+
git config user.name 'voltius-bot'
66+
git config user.email 'bot@voltius.app'
67+
git add Casks/voltius.rb
68+
git commit -m "chore: update voltius cask to ${TAG}"
69+
git push origin HEAD:main
70+
71+
winget:
72+
runs-on: ubuntu-latest
73+
steps:
74+
- name: Resolve tag
75+
id: tag
76+
env:
77+
DISPATCH_TAG: ${{ inputs.tag }}
78+
RELEASE_TAG: ${{ github.event.release.tag_name }}
79+
run: echo "tag=${DISPATCH_TAG:-$RELEASE_TAG}" >> "$GITHUB_OUTPUT"
80+
81+
- name: Submit/update winget manifest
82+
uses: vedantmgoyal9/winget-releaser@v2
83+
with:
84+
identifier: Voltius.Voltius
85+
release-tag: ${{ steps.tag.outputs.tag }}
86+
installers-regex: '_(x64|arm64)-setup\.exe$'
87+
token: ${{ secrets.WINGET_PKGS_TOKEN }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# One-time bootstrap of the Voltius.Voltius winget manifest. Run manually once,
2+
# then delete this file — recurring updates are handled by publish-installers.yml.
3+
name: winget-bootstrap
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
description: 'Release tag to bootstrap (e.g. v0.4.0)'
9+
required: true
10+
type: string
11+
jobs:
12+
bootstrap:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
- name: komac new
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.WINGET_PKGS_TOKEN }}
19+
GH_TOKEN: ${{ secrets.WINGET_PKGS_TOKEN }}
20+
TAG: ${{ inputs.tag }}
21+
run: bash scripts/bootstrap-winget.sh

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,33 @@ sudo dnf install voltius
6767
On older dnf, replace the `curl` line with `sudo dnf config-manager --add-repo https://repo.voltius.app/voltius.repo`.
6868
</details>
6969

70-
### Windows & macOS
70+
### macOS — Homebrew
7171

72-
Download from [voltius.app/download](https://voltius.app/download).
72+
```sh
73+
brew install --cask voltiusapp/voltius/voltius
74+
```
75+
76+
Voltius is not yet signed/notarized. If macOS Gatekeeper blocks the first launch,
77+
right-click the app and choose **Open**, or install with `--no-quarantine`:
78+
79+
```sh
80+
brew install --cask --no-quarantine voltiusapp/voltius/voltius
81+
```
82+
83+
### Windows — winget
84+
85+
```sh
86+
winget install Voltius.Voltius
87+
```
88+
89+
Windows SmartScreen may warn that the publisher is unverified (the app is not yet
90+
code-signed) — choose **More info → Run anyway**.
91+
92+
### Other downloads
93+
94+
Direct installers (`.dmg`, `.msi`, `.exe`, `.AppImage`) are on
95+
[voltius.app/download](https://voltius.app/download). Voltius updates itself in-app
96+
on macOS and Windows after installation.
7397

7498
## ⚖️ Comparison (WIP)
7599

scripts/bootstrap-winget.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env bash
2+
# One-time: create the initial Voltius.Voltius manifest in microsoft/winget-pkgs
3+
# via komac `new`. Run via the winget-bootstrap workflow (workflow_dispatch).
4+
# After microsoft/winget-pkgs merges this PR, future releases use winget-releaser.
5+
#
6+
# komac `new` is interactive even with metadata flags (it prompts for install
7+
# modes, return codes, protocols, etc.), so we drive it through a pseudo-TTY
8+
# (util-linux `script`) and feed newlines to accept the defaults. komac picks up
9+
# the token from $GITHUB_TOKEN. komac's built-in duplicate-PR check makes re-runs
10+
# safe (it aborts instead of opening a second PR).
11+
#
12+
# Env: GITHUB_TOKEN (WINGET_PKGS_TOKEN), TAG.
13+
set -euo pipefail
14+
15+
TAG="${TAG:?set TAG, e.g. v0.4.0}"
16+
VERSION="${TAG#v}"
17+
BASE="https://github.com/VoltiusApp/voltius/releases/download/${TAG}"
18+
19+
# Install komac (Rust binary; x86_64 ubuntu runner).
20+
KOMAC_VER="$(gh release view -R russellbanks/Komac --json tagName --jq '.tagName' | sed 's/^v//')"
21+
curl -fsSL -o komac.deb \
22+
"https://github.com/russellbanks/Komac/releases/download/v${KOMAC_VER}/komac_${KOMAC_VER}-1_amd64.deb"
23+
sudo dpkg -i komac.deb
24+
25+
# komac pushes its branch to the token owner's fork of winget-pkgs and opens the
26+
# PR from there — the fork must exist first (komac does not create it).
27+
OWNER="$(gh api user --jq .login)"
28+
if ! gh repo view "${OWNER}/winget-pkgs" >/dev/null 2>&1; then
29+
gh repo fork microsoft/winget-pkgs --clone=false
30+
for _ in $(seq 1 30); do
31+
gh repo view "${OWNER}/winget-pkgs" >/dev/null 2>&1 && break
32+
sleep 2
33+
done
34+
fi
35+
gh repo view "${OWNER}/winget-pkgs" >/dev/null 2>&1 || { echo "fork ${OWNER}/winget-pkgs not ready" >&2; exit 1; }
36+
37+
cat > /tmp/komac-new.sh <<SH
38+
set -e
39+
komac new Voltius.Voltius \\
40+
--version "${VERSION}" \\
41+
--urls "${BASE}/Voltius_${VERSION}_x64-setup.exe" "${BASE}/Voltius_${VERSION}_arm64-setup.exe" \\
42+
--publisher "Voltius" --publisher-url "https://voltius.app/" \\
43+
--package-name "Voltius" --package-url "https://voltius.app/" \\
44+
--moniker "voltius" --license "AGPL-3.0-only" \\
45+
--short-description "Cross-platform SSH client and terminal" \\
46+
--submit
47+
SH
48+
49+
# Drive komac through a pty, feeding newlines to accept every interactive default.
50+
# `timeout` caps a stuck prompt; `script -e` propagates komac's exit code.
51+
timeout 600 script -qefc 'bash /tmp/komac-new.sh' /dev/null \
52+
< <(while true; do printf '\n'; sleep 2; done)

scripts/gen-homebrew-cask.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
# Emits a complete Homebrew Cask for Voltius to stdout.
3+
# Usage: gen-homebrew-cask.sh <tag> e.g. gen-homebrew-cask.sh v0.4.0
4+
# Requires: gh (authenticated), awk. Reads the .dmg.sha256 release assets.
5+
set -euo pipefail
6+
7+
TAG="${1:?usage: gen-homebrew-cask.sh <tag>}"
8+
REPO="${REPO:-VoltiusApp/voltius}"
9+
VERSION="${TAG#v}"
10+
11+
tmp="$(mktemp -d)"
12+
trap 'rm -rf "$tmp"' EXIT
13+
14+
fetch_sha() {
15+
# $1 = arch token in the asset filename (aarch64|x64)
16+
local arch="$1" name="Voltius_${VERSION}_$1.dmg.sha256"
17+
gh release download "$TAG" -R "$REPO" -p "$name" -O "$tmp/$arch.sha256" >/dev/null
18+
awk '{print $1}' "$tmp/$arch.sha256"
19+
}
20+
21+
SHA_ARM="$(fetch_sha aarch64)"
22+
SHA_INTEL="$(fetch_sha x64)"
23+
24+
cat <<EOF
25+
cask "voltius" do
26+
arch arm: "aarch64", intel: "x64"
27+
28+
version "${VERSION}"
29+
sha256 arm: "${SHA_ARM}",
30+
intel: "${SHA_INTEL}"
31+
32+
url "https://github.com/VoltiusApp/voltius/releases/download/v#{version}/Voltius_#{version}_#{arch}.dmg",
33+
verified: "github.com/VoltiusApp/voltius/"
34+
name "Voltius"
35+
desc "Cross-platform SSH client and terminal"
36+
homepage "https://voltius.app/"
37+
38+
livecheck do
39+
url :url
40+
strategy :github_latest
41+
end
42+
43+
auto_updates true
44+
depends_on :macos
45+
46+
app "Voltius.app"
47+
48+
caveats <<~CAVEATS
49+
Voltius is not yet signed or notarized, so on first launch macOS Gatekeeper
50+
will warn that the app cannot be checked for malware.
51+
52+
Right-click (or Control-click) Voltius in Applications and choose Open, then
53+
confirm. You only need to do this once.
54+
55+
To skip the warning entirely, install with:
56+
brew install --cask --no-quarantine voltiusapp/voltius/voltius
57+
58+
Voltius updates itself in-app after installation.
59+
CAVEATS
60+
end
61+
EOF

0 commit comments

Comments
 (0)