Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/homebrew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,25 @@ jobs:
exit 1
fi
done
python3 scripts/render_homebrew_formula.py \
--version "$VERSION" \
--sha256sums SHA256SUMS \
--write \
RENDER_ARGS=(
--version "$VERSION"
--sha256sums SHA256SUMS
--write
--out /tmp/numan.rb
)
# Linux ARM is required for current releases; omit when recovering pre-ARM tags.
linux_arm_asset="numan-${VERSION}-aarch64-unknown-linux-gnu.tar.gz"
linux_arm_ok="$(
gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --json isDraft,assets \
--jq ".isDraft == false and any(.assets[]; .name == \"${linux_arm_asset}\" and .state == \"uploaded\")"
)"
if [[ "$linux_arm_ok" == "true" ]]; then
echo "Found Linux ARM archive ${linux_arm_asset}"
else
echo "No Linux ARM archive on ${RELEASE_TAG}; using --legacy-pre-linux-arm"
RENDER_ARGS+=(--legacy-pre-linux-arm)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
fi
python3 scripts/render_homebrew_formula.py "${RENDER_ARGS[@]}"
cp /tmp/numan.rb packaging/homebrew/numan.rb

- name: Push formula to homebrew-numan tap
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,15 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin_name: numan
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
bin_name: numan
- os: windows-latest
target: x86_64-pc-windows-msvc
bin_name: numan.exe
- os: windows-11-arm
target: aarch64-pc-windows-msvc
bin_name: numan.exe
- os: macos-latest
target: aarch64-apple-darwin
bin_name: numan
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,25 @@ jobs:
--jq 'any(.artifacts[]; .name == "winget-release-ready" and .expired == false)' \
| grep -Fx true

- name: Verify published Windows release asset
- name: Verify published Windows release assets
env:
GH_TOKEN: ${{ github.token }}
shell: bash
run: |
set -euo pipefail
expected_asset="numan-${RELEASE_TAG#v}-x86_64-pc-windows-msvc.zip"
gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --json isDraft,assets \
| jq -e --arg expected_asset "$expected_asset" \
'.isDraft == false and any(.assets[]; .name == $expected_asset and .state == "uploaded")' \
>/dev/null
for triple in x86_64-pc-windows-msvc aarch64-pc-windows-msvc; do
expected_asset="numan-${RELEASE_TAG#v}-${triple}.zip"
gh release view "$RELEASE_TAG" --repo "$GITHUB_REPOSITORY" --json isDraft,assets \
| jq -e --arg expected_asset "$expected_asset" \
'.isDraft == false and any(.assets[]; .name == $expected_asset and .state == "uploaded")' \
>/dev/null
done

- name: Publish manifest to WinGet
uses: vedantmgoyal9/winget-releaser@b3a5dae0047c6180023acba3f548c55fdf6b7193
with:
identifier: tonythethompson.numan
fork-user: tonythethompson
installers-regex: '\.zip$'
installers-regex: '-(x86_64|aarch64)-pc-windows-msvc\.zip$'
release-tag: ${{ env.RELEASE_TAG }}
token: ${{ secrets.WINGET_TOKEN }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- **Release assets** for `aarch64-unknown-linux-gnu` and `aarch64-pc-windows-msvc` (native ARM runners); `numan update --self` maps those triples
- **Homebrew** Linux ARM archive support; **winget** verifies and submits both Windows x64 and ARM64 zips
### Fixed

- **`numan setup nu`**: official Nushell 0.114.x release archives exceed the old
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ Download the latest archive for your platform from [GitHub Releases](https://git
| Platform | Archive | Binary |
|----------|---------|--------|
| Linux (x86_64) | `numan-<version>-x86_64-unknown-linux-gnu.tar.gz` | `numan` |
| Linux (aarch64) | `numan-<version>-aarch64-unknown-linux-gnu.tar.gz` | `numan` |
| Windows (x86_64) | `numan-<version>-x86_64-pc-windows-msvc.zip` | `numan.exe` |
| Windows (ARM64) | `numan-<version>-aarch64-pc-windows-msvc.zip` | `numan.exe` |
Comment thread
coderabbitai[bot] marked this conversation as resolved.
| macOS (Apple Silicon) | `numan-<version>-aarch64-apple-darwin.tar.gz` | `numan` |

**Linux / macOS**
Expand All @@ -106,7 +108,7 @@ install -m 755 numan-VERSION-TARGET/numan ~/.local/bin/numan
**Windows (PowerShell)**

```powershell
Expand-Archive numan-VERSION-x86_64-pc-windows-msvc.zip -DestinationPath .
Expand-Archive numan-VERSION-TARGET.zip -DestinationPath .
# Add the extracted folder to your PATH, or copy numan.exe into a directory already on PATH
```

Expand Down
12 changes: 6 additions & 6 deletions docs/PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ Release archives extract to `numan-<version>-<target>/` containing the `numan`

## Installation coverage

| Installation channel | Linux x86_64 | macOS Apple Silicon | Windows x86_64 | Windows ARM64 |
|-----------------------|---------------|---------------------|----------------|---------------|
| GitHub release archive | yes | yes | yes | no |
| `cargo install numan-cli` | source build | source build | source build | not validated |
| Homebrew tap | yes | yes | — | — |
| winget | — | — | yes | |
| Installation channel | Linux x86_64 | Linux aarch64 | macOS Apple Silicon | Windows x86_64 | Windows ARM64 |
|-----------------------|---------------|---------------|---------------------|----------------|---------------|
| GitHub release archive | yes | yes | yes | yes | yes |
| `cargo install numan-cli` | source build | source build | source build | source build | not validated |
| Homebrew tap | yes | yes | yes | — | — |
| winget | — | — | — | yes | yes |

## Secrets

Expand Down
2 changes: 1 addition & 1 deletion docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Then:
```

6. The [Release workflow](https://github.com/tonythethompson/numan/actions/workflows/release.yml) waits for green CI on the tagged commit, runs preflight checks, then builds archives and publishes.
7. Confirm platform archives, `SHA256SUMS`, and `SHA256SUMS.sig` on GitHub Releases.
7. Confirm platform archives (`x86_64-unknown-linux-gnu`, `aarch64-unknown-linux-gnu`, `x86_64-pc-windows-msvc`, `aarch64-pc-windows-msvc`, `aarch64-apple-darwin`), `SHA256SUMS`, and `SHA256SUMS.sig` on GitHub Releases.
8. Confirm the **Publish to crates.io** job succeeds (requires Trusted Publishing / OIDC on crates.io).
9. Confirm the [`Publish to WinGet`](../.github/workflows/winget.yml) workflow verifies the `winget-release-ready` artifact and published Windows release asset, then opens the update PR after the `v*.*.*` tag-triggered Release workflow completes (manual recovery: dispatch with required `release_tag`).
10. Confirm the [`Publish to Homebrew tap`](../.github/workflows/homebrew.yml) workflow verifies the `homebrew-release-ready` artifact and pushes `Formula/numan.rb` to [`tonythethompson/homebrew-numan`](https://github.com/tonythethompson/homebrew-numan) (requires `HOMEBREW_TAP_TOKEN`; manual recovery: dispatch with required `release_tag`).
Expand Down
31 changes: 27 additions & 4 deletions packaging/homebrew/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Homebrew packaging

Canonical formula source lives at [`numan.rb`](numan.rb). The published tap is
The formula **shape** (bottle platforms, install layout) is defined by
[`scripts/render_homebrew_formula.py`](../../scripts/render_homebrew_formula.py).
[`numan.rb`](numan.rb) is the last generated snapshot checked into this repo for
review; digests and bottle stanzas may lag until the next tagged release whose
`SHA256SUMS` include every required archive. Today it still matches the
pre-Linux-ARM contract (macOS ARM + Linux x86_64 only) because no published
release yet ships `aarch64-unknown-linux-gnu`. The live tap is
[`tonythethompson/homebrew-numan`](https://github.com/tonythethompson/homebrew-numan)
(`brew tap tonythethompson/numan`).
(`brew tap tonythethompson/numan`), updated by the publish workflow after each
`v*.*.*` release.

## Install

Expand All @@ -21,20 +28,36 @@ Prefer the automated path: after a `v*.*.*` GitHub Release, the
downloads `SHA256SUMS`, regenerates the formula, and pushes
`Formula/numan.rb` to the tap.

Manual / dry-run:
Manual / dry-run (current formula: all three Homebrew archives, including Linux
ARM). Use a tag that ships `aarch64-unknown-linux-gnu` (the first such release
after the ARM platform expansion). Pre-ARM tags such as `v0.1.5` need
`--legacy-pre-linux-arm`:

```bash
# ARM-enabled release (preferred):
gh release download vX.Y.Z --pattern SHA256SUMS
python3 scripts/render_homebrew_formula.py \
--version X.Y.Z \
--sha256sums SHA256SUMS \
--write

# Pre-Linux-ARM recovery only (e.g. v0.1.5):
gh release download v0.1.5 --pattern SHA256SUMS
python3 scripts/render_homebrew_formula.py \
--version 0.1.5 \
--sha256sums SHA256SUMS \
--legacy-pre-linux-arm \
--write
```

Required release assets:
Required release assets (current):

- `numan-<version>-aarch64-apple-darwin.tar.gz`
- `numan-<version>-x86_64-unknown-linux-gnu.tar.gz`
- `numan-<version>-aarch64-unknown-linux-gnu.tar.gz`
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Legacy (`--legacy-pre-linux-arm`) omits the Linux ARM archive and the formula
`on_linux` / `on_arm` bottle block.

Intel Mac (`x86_64-apple-darwin`) is not shipped; the formula fails with a clear
`odie` on Intel Hardware.
Expand Down
4 changes: 4 additions & 0 deletions packaging/homebrew/numan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
# Generated by scripts/render_homebrew_formula.py — do not hand-edit digests.
# The Publish to Homebrew workflow updates this file and the homebrew-numan tap
# after each v*.*.* GitHub Release.
#
# Snapshot note: this checked-in copy may lag the renderer. It currently omits
# the Linux ARM (on_linux/on_arm) stanza until a release publishes
# aarch64-unknown-linux-gnu digests; see packaging/homebrew/README.md.

class Numan < Formula
desc "Cross-platform package manager for Nushell"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.12.0.schema.json

# Sample installer shape for this historical release (x64 only). Live publishes
# are driven by winget-releaser; dual-arch (x64 + arm64) applies once ARM zips ship.
Comment thread
tonythethompson marked this conversation as resolved.
Outdated
PackageIdentifier: tonythethompson.numan
PackageVersion: 0.1.3
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.3-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
Commands:
- numan
Installers:
- Architecture: x64
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.3-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
InstallerUrl: https://github.com/tonythethompson/numan/releases/download/v0.1.3/numan-0.1.3-x86_64-pc-windows-msvc.zip
InstallerSha256: 90F659E665836F26E2FD45AD86ED8F73C1B6BCB24BE87CF3760EC000E094ABA1
ManifestType: installer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.12.0.schema.json

# Sample installer shape for this historical release (x64 only). Live publishes
# are driven by winget-releaser; dual-arch (x64 + arm64) applies once ARM zips ship.
PackageIdentifier: tonythethompson.numan
PackageVersion: 0.1.4
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.4-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
Commands:
- numan
Installers:
- Architecture: x64
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.4-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
InstallerUrl: https://github.com/tonythethompson/numan/releases/download/v0.1.4/numan-0.1.4-x86_64-pc-windows-msvc.zip
InstallerSha256: F843A717BD7FD13F2D86BF727D2292DCF9831F2544A3DF88987104299229EF9D
ManifestType: installer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.12.0.schema.json

# Sample installer shape for this historical release (x64 only). Live publishes
# are driven by winget-releaser; dual-arch (x64 + arm64) applies once ARM zips ship.
PackageIdentifier: tonythethompson.numan
PackageVersion: 0.1.3
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.3-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
Commands:
- numan
Installers:
- Architecture: x64
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.3-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
InstallerUrl: https://github.com/tonythethompson/numan/releases/download/v0.1.3/numan-0.1.3-x86_64-pc-windows-msvc.zip
InstallerSha256: 90F659E665836F26E2FD45AD86ED8F73C1B6BCB24BE87CF3760EC000E094ABA1
ManifestType: installer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.12.0.schema.json

# Sample installer shape for this historical release (x64 only). Live publishes
# are driven by winget-releaser; dual-arch (x64 + arm64) applies once ARM zips ship.
PackageIdentifier: tonythethompson.numan
PackageVersion: 0.1.4
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.4-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
Commands:
- numan
Installers:
- Architecture: x64
NestedInstallerFiles:
- RelativeFilePath: numan-0.1.4-x86_64-pc-windows-msvc\numan.exe
PortableCommandAlias: numan
InstallerUrl: https://github.com/tonythethompson/numan/releases/download/v0.1.4/numan-0.1.4-x86_64-pc-windows-msvc.zip
InstallerSha256: F843A717BD7FD13F2D86BF727D2292DCF9831F2544A3DF88987104299229EF9D
ManifestType: installer
Expand Down
Loading
Loading