feat: add curl|sh one-liner install script

- Add scripts/install.sh for easy installation via curl
- Auto-detects OS (linux, darwin, windows) and arch (amd64, arm64)
- Supports version pinning: sh -s -- v1.2.3
- Installs to /usr/local/bin or ~/.local/bin as fallback
- Updates release workflow to include install.sh in release assets
- Adds README.md with installation documentation
This commit is contained in:
MermaidMan 2026-05-22 15:43:19 +00:00
parent d080e107d0
commit 21f2bd3a9d
3 changed files with 471 additions and 7 deletions

View file

@ -109,6 +109,11 @@ jobs:
find . -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec sha256sum {} \; > ../checksums.txt
cat ../checksums.txt
- name: Get install script
run: |
cp scripts/install.sh install.sh
chmod +x install.sh
- name: Create Release
uses: softprops/action-gh-release@v1
with:
@ -127,16 +132,18 @@ jobs:
### Installation
**Linux/macOS:**
**One-liner (Linux/macOS):**
```bash
# Download and extract
curl -sL https://github.com/openboatmobile/obm/releases/download/${{ steps.version.outputs.VERSION }}/obm-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/').tar.gz | tar xz
chmod +x obm
sudo mv obm /usr/local/bin/
curl -fsSL https://raw.githubusercontent.com/openboatmobile/obm/main/scripts/install.sh | sh
```
**Windows:**
Download the appropriate `.zip` file, extract, and add to PATH.
Or install a specific version:
```bash
curl -fsSL https://raw.githubusercontent.com/openboatmobile/obm/main/scripts/install.sh | sh -s -- v1.2.3
```
**Manual download:**
Download the archive for your platform, extract, and place `obm` in your PATH.
### Usage
```bash
@ -149,6 +156,7 @@ jobs:
artifacts/**/obm-*.tar.gz
artifacts/**/obm-*.zip
checksums.txt
install.sh
draft: false
prerelease: ${{ contains(steps.version.outputs.VERSION, '-') }}
generate_release_notes: false