Skip to content

Commit 2fe432f

Browse files
committed
Add windows release and update readme
1 parent 547931e commit 2fe432f

4 files changed

Lines changed: 251 additions & 9 deletions

File tree

.github/workflows/tag-release.yml

Lines changed: 114 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ jobs:
9797
os: macos-latest
9898
- target: aarch64-apple-darwin
9999
os: macos-latest
100+
- target: x86_64-pc-windows-msvc
101+
os: windows-latest
100102
runs-on: ${{ matrix.os }}
101103
steps:
102104
- name: Checkout
@@ -134,11 +136,18 @@ jobs:
134136
- name: Build .deb (amd64)
135137
run: cargo deb
136138

139+
# A version-less copy so the README can link a permanent download URL:
140+
# https://github.com/.../releases/latest/download/filo-amd64.deb
141+
- name: Create stable-named alias
142+
run: cp target/debian/*_amd64.deb target/debian/filo-amd64.deb
143+
137144
- name: Upload .deb to release
138145
uses: softprops/action-gh-release@v3
139146
with:
140147
tag_name: ${{ needs.classify.outputs.tag }}
141-
files: target/debian/*.deb
148+
files: |
149+
target/debian/*_amd64.deb
150+
target/debian/filo-amd64.deb
142151
143152
bump-homebrew:
144153
name: Bump Homebrew Formula
@@ -229,3 +238,107 @@ jobs:
229238
git commit -m "filo-rs ${VERSION}"
230239
git push
231240
fi
241+
242+
bump-scoop:
243+
name: Bump Scoop Manifest
244+
# Same gating note as bump-homebrew applies if you want stable-only.
245+
needs: upload-binaries
246+
runs-on: ubuntu-latest
247+
steps:
248+
- name: Compute version (strip leading v)
249+
id: v
250+
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
251+
252+
- name: Checkout Scoop bucket
253+
uses: actions/checkout@v6
254+
with:
255+
repository: Kanishk2207/scoop-filo
256+
token: ${{ secrets.SCOOP_BUCKET_TOKEN }}
257+
path: scoop
258+
259+
- name: Regenerate manifest with new version and checksum
260+
env:
261+
VERSION: ${{ steps.v.outputs.version }}
262+
run: |
263+
set -euo pipefail
264+
base="https://github.com/Kanishk2207/filo/releases/download/v${VERSION}"
265+
HASH="$(curl -fsSL "${base}/filo-v${VERSION}-x86_64-pc-windows-msvc.zip" | sha256sum | awk '{print $1}')"
266+
mkdir -p scoop/bucket
267+
# In the JSON, \$version is left literal so Scoop's own autoupdate can
268+
# resolve it later; ${VERSION} and ${HASH} are filled in now.
269+
cat > scoop/bucket/filo.json <<EOF
270+
{
271+
"version": "${VERSION}",
272+
"description": "Your Downloads folder cleans itself — safely, predictably, and reversibly.",
273+
"homepage": "https://github.com/Kanishk2207/filo",
274+
"license": "MIT OR Apache-2.0",
275+
"architecture": {
276+
"64bit": {
277+
"url": "${base}/filo-v${VERSION}-x86_64-pc-windows-msvc.zip",
278+
"hash": "${HASH}"
279+
}
280+
},
281+
"bin": "filo.exe",
282+
"checkver": "github",
283+
"autoupdate": {
284+
"architecture": {
285+
"64bit": {
286+
"url": "https://github.com/Kanishk2207/filo/releases/download/v\$version/filo-v\$version-x86_64-pc-windows-msvc.zip"
287+
}
288+
}
289+
}
290+
}
291+
EOF
292+
293+
- name: Commit and push to bucket
294+
env:
295+
VERSION: ${{ steps.v.outputs.version }}
296+
run: |
297+
cd scoop
298+
git config user.name "github-actions[bot]"
299+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
300+
git add bucket/filo.json
301+
if git diff --cached --quiet; then
302+
echo "Manifest already up to date — nothing to commit."
303+
else
304+
git commit -m "filo ${VERSION}"
305+
git push
306+
fi
307+
308+
windows-installer:
309+
name: Build Windows Installer (.msi)
310+
needs: release
311+
runs-on: windows-latest
312+
steps:
313+
- name: Checkout
314+
uses: actions/checkout@v6
315+
316+
- name: Set up Rust
317+
uses: dtolnay/rust-toolchain@stable
318+
319+
- name: Install cargo-wix
320+
run: cargo install cargo-wix
321+
322+
# Generates wix/main.wxs from Cargo.toml metadata. The default template
323+
# installs filo.exe to Program Files and adds it to the system PATH.
324+
# (If you later want a custom EULA/icon, commit a hand-edited wix/main.wxs
325+
# and drop this step.)
326+
- name: Initialize WiX config
327+
run: cargo wix init --force
328+
329+
- name: Build MSI
330+
run: cargo wix --nocapture
331+
332+
# A version-less copy so the README can link a permanent download URL:
333+
# https://github.com/.../releases/latest/download/filo-x86_64.msi
334+
- name: Create stable-named alias
335+
shell: bash
336+
run: cp target/wix/*.msi target/wix/filo-x86_64.msi
337+
338+
- name: Upload MSI to release
339+
uses: softprops/action-gh-release@v3
340+
with:
341+
tag_name: ${{ needs.classify.outputs.tag }}
342+
files: |
343+
target/wix/filo-rs-*.msi
344+
target/wix/filo-x86_64.msi

packaging/README.md

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ tag now produces:
1414
| `filo-vX.Y.Z-aarch64-unknown-linux-gnu.tar.gz` | Homebrew, AUR |
1515
| `filo-vX.Y.Z-x86_64-apple-darwin.tar.gz` | Homebrew (Intel) |
1616
| `filo-vX.Y.Z-aarch64-apple-darwin.tar.gz` | Homebrew (Apple S) |
17-
| `*.sha256` (one per archive) | checksum updates |
17+
| `filo-vX.Y.Z-x86_64-pc-windows-msvc.zip` | Scoop / WinGet |
18+
| `filo-rs-X.Y.Z-x86_64.msi` | Windows installer |
1819
| `filo-rs_X.Y.Z-1_amd64.deb` | apt / dpkg |
1920

20-
> Each archive has a matching `.sha256` file in the same release. Use those
21-
> values to fill the `REPLACE_WITH_..._SHA256` placeholders below.
21+
> To fill any `REPLACE_WITH_..._SHA256` placeholder by hand, download the archive
22+
> and hash it: `curl -sL <archive-url> | sha256sum`. The auto-bump jobs do this
23+
> for you.
2224
2325
---
2426

@@ -136,12 +138,74 @@ Start with the direct `.deb` download; add a hosted repo later if there's demand
136138
137139
---
138140

141+
## 4. Windows
142+
143+
Two complementary options: a **double-click `.msi` installer** (the `.deb`
144+
analog, best for casual users) and a **Scoop** bucket (for terminal users).
145+
146+
> Reminder: `filo` is a command-line tool. The installer puts `filo` on the
147+
> system PATH and adds a clean entry in "Add or remove programs", so afterwards
148+
> `filo` works in any Command Prompt/PowerShell — but the user still runs it from
149+
> a terminal. A clickable GUI would be a separate project.
150+
151+
### 4a. Double-click installer (`.msi`)
152+
153+
The `windows-installer` job in `tag-release.yml` builds an `.msi` with
154+
[`cargo-wix`](https://github.com/volks73/cargo-wix) and attaches it to every
155+
release. **Nothing for you to set up** — no extra repo or token. Users:
156+
157+
1. Download `filo-rs-X.Y.Z-x86_64.msi` from the release page.
158+
2. Double-click → installer wizard → Finish.
159+
3. Open a new terminal and run `filo --version`.
160+
161+
To uninstall, they use **Settings → Apps → Installed apps** like any program.
162+
163+
> The first release that runs this job is the test: `.msi` builds depend on the
164+
> WiX toolset on the Windows runner. If it ever fails, commit a generated
165+
> `wix/main.wxs` (run `cargo wix init` once on a Windows machine) for full
166+
> control. Code-signing (to avoid the SmartScreen "unknown publisher" warning)
167+
> is a paid cert you can add later.
168+
169+
### 4b. Scoop
170+
171+
[Scoop](https://scoop.sh) is the Windows equivalent of your Homebrew tap: a
172+
**bucket** is a git repo full of JSON manifests that you own. It installs the
173+
`filo.exe` from the release `.zip` — no admin rights, no compiler needed.
174+
175+
**One-time setup:**
176+
177+
1. Create a new GitHub repo named **`scoop-filo`** (any name works, but
178+
`scoop-<app>` is the convention). It can start empty.
179+
2. Create a fine-grained PAT with **Contents: Read and write** on `scoop-filo`
180+
(same procedure as the Homebrew token), and add it to the **`filo`** repo as a
181+
secret named **`SCOOP_BUCKET_TOKEN`**. (You can reuse the same PAT as Homebrew
182+
if you grant it access to both repos.)
183+
3. Cut a release. The `bump-scoop` job in `tag-release.yml` computes the `.zip`
184+
hash and writes `bucket/filo.json` into `scoop-filo` automatically — so the
185+
bucket populates itself; you don't seed it by hand.
186+
187+
A reference manifest lives at [`scoop/filo.json`](scoop/filo.json).
188+
189+
**Users install with:**
190+
```powershell
191+
scoop bucket add filo https://github.com/Kanishk2207/scoop-filo
192+
scoop install filo
193+
```
194+
Updates: `scoop update filo`. Uninstall: `scoop uninstall filo`.
195+
196+
> **WinGet** (`winget install`, built into Windows 11) and **Chocolatey**
197+
> (`choco install`) are heavier follow-ups: both require submitting a manifest
198+
> via PR to a central, moderated repo rather than a repo you own. Add them once
199+
> Scoop is proven and there's demand.
200+
201+
---
202+
139203
## Release checklist
140204

141205
1. Bump `version` in `Cargo.toml`; commit.
142206
2. Publish to crates.io via the **Publish Crate** workflow (or `cargo publish`).
143207
3. Tag and push: `git tag v0.1.0 && git push origin v0.1.0`.
144-
- `tag-release.yml` creates the GitHub Release and attaches all binaries +
145-
the `.deb`.
146-
4. Update the Homebrew formula hashes + version → push to `homebrew-filo`.
147-
5. Bump the AUR `filo-bin` package (`updpkgsums`, `.SRCINFO`) → push.
208+
- `tag-release.yml` creates the GitHub Release, attaches all binaries + the
209+
`.deb`, and **auto-bumps Homebrew and Scoop** (given the tokens are set).
210+
4. Bump the AUR `filo-bin` package (`updpkgsums`, `.SRCINFO`) → push. *(Manual —
211+
AUR auto-publish is a future add-on.)*

packaging/scoop/filo.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "0.2.0",
3+
"description": "Your Downloads folder cleans itself — safely, predictably, and reversibly.",
4+
"homepage": "https://github.com/Kanishk2207/filo",
5+
"license": "MIT OR Apache-2.0",
6+
"architecture": {
7+
"64bit": {
8+
"url": "https://github.com/Kanishk2207/filo/releases/download/v0.2.0/filo-v0.2.0-x86_64-pc-windows-msvc.zip",
9+
"hash": "REPLACE_WITH_x86_64-pc-windows-msvc_SHA256"
10+
}
11+
},
12+
"bin": "filo.exe",
13+
"checkver": "github",
14+
"autoupdate": {
15+
"architecture": {
16+
"64bit": {
17+
"url": "https://github.com/Kanishk2207/filo/releases/download/v$version/filo-v$version-x86_64-pc-windows-msvc.zip"
18+
}
19+
}
20+
}
21+
}

readme.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,51 @@ that's the point.
5858

5959
## Installation
6060

61-
### From crates.io (recommended)
61+
> `filo` is a command-line tool. After installing by any method below, run it
62+
> from a terminal (Command Prompt / PowerShell / Terminal). The package name on
63+
> crates.io is `filo-rs`; the installed command is always `filo`.
64+
65+
### Windows
66+
67+
[![Download for Windows](https://img.shields.io/badge/Download-Windows%20installer%20(.msi)-0078D6?logo=windows&logoColor=white&style=for-the-badge)](https://github.com/Kanishk2207/filo/releases/latest/download/filo-x86_64.msi)
68+
69+
Download the `.msi`, double-click it, and follow the wizard. Then open a new
70+
terminal and run `filo --version`. To uninstall: **Settings → Apps → Installed
71+
apps → filo**.
72+
73+
Prefer a package manager? With [Scoop](https://scoop.sh):
74+
75+
```powershell
76+
scoop bucket add filo https://github.com/Kanishk2207/scoop-filo
77+
scoop install filo
78+
```
79+
80+
### Ubuntu / Debian
81+
82+
[![Download for Ubuntu/Debian](https://img.shields.io/badge/Download-Ubuntu%2FDebian%20package%20(.deb)-E95420?logo=debian&logoColor=white&style=for-the-badge)](https://github.com/Kanishk2207/filo/releases/latest/download/filo-amd64.deb)
83+
84+
Download the `.deb` and install it (double-click to open in Software Install, or
85+
from a terminal):
86+
87+
```bash
88+
sudo dpkg -i ~/Downloads/filo-amd64.deb
89+
```
90+
91+
To uninstall: `sudo dpkg -r filo-rs`.
92+
93+
### macOS
94+
95+
```bash
96+
brew install Kanishk2207/filo/filo-rs
97+
```
98+
99+
### Arch Linux
100+
101+
```bash
102+
yay -S filo-bin
103+
```
104+
105+
### Any OS — from crates.io (recommended for Rust users)
62106

63107
```bash
64108
cargo install filo-rs

0 commit comments

Comments
 (0)