Skip to content

Commit 6ce2640

Browse files
committed
chore(cli): Binary releases
Signed-off-by: Dmitry Dygalo <[email protected]>
1 parent ed9e467 commit 6ce2640

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

.github/workflows/cli-release.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CLI Binary Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- cli-v*
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- uses: actions/checkout@v5
16+
- name: Extract version from tag
17+
id: version
18+
run: echo "version=${GITHUB_REF#refs/tags/cli-v}" >> $GITHUB_OUTPUT
19+
- name: Create GitHub Release
20+
run: |
21+
gh release create "${{ github.ref_name }}" \
22+
--title "[CLI] Release ${{ steps.version.outputs.version }}" \
23+
--notes "" \
24+
--latest=false
25+
env:
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
upload-assets:
29+
needs: create-release
30+
strategy:
31+
matrix:
32+
include:
33+
# Linux - GNU libc
34+
- target: x86_64-unknown-linux-gnu
35+
os: ubuntu-24.04
36+
- target: aarch64-unknown-linux-gnu
37+
os: ubuntu-24.04
38+
# Linux - MUSL
39+
- target: x86_64-unknown-linux-musl
40+
os: ubuntu-24.04
41+
- target: aarch64-unknown-linux-musl
42+
os: ubuntu-24.04
43+
# macOS
44+
- target: x86_64-apple-darwin
45+
os: macos-15
46+
- target: aarch64-apple-darwin
47+
os: macos-15
48+
# Windows
49+
- target: x86_64-pc-windows-msvc
50+
os: windows-2025
51+
- target: x86_64-pc-windows-gnu
52+
os: windows-2025
53+
runs-on: ${{ matrix.os }}
54+
steps:
55+
- uses: actions/checkout@v5
56+
with:
57+
submodules: true
58+
- name: Install Rust
59+
uses: dtolnay/rust-toolchain@stable
60+
with:
61+
targets: ${{ matrix.target }}
62+
- name: Install cross compilation tools
63+
uses: taiki-e/setup-cross-toolchain-action@v1
64+
with:
65+
target: ${{ matrix.target }}
66+
if: startsWith(matrix.os, 'ubuntu')
67+
- uses: taiki-e/upload-rust-binary-action@v1
68+
with:
69+
token: ${{ secrets.GITHUB_TOKEN }}
70+
bin: jsonschema-cli
71+
manifest-path: crates/jsonschema-cli/Cargo.toml
72+
target: ${{ matrix.target }}

crates/jsonschema-cli/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,29 @@ A fast command-line tool for JSON Schema validation, powered by the `jsonschema`
77

88
## Installation
99

10+
### Pre-built Binaries
11+
12+
Download the latest binary for your platform from the [releases page](https://github.com/Stranger6667/jsonschema-rs/releases):
13+
14+
- **Linux (x86_64)**: `jsonschema-cli-x86_64-unknown-linux-gnu.tar.gz`
15+
- **Linux (ARM64)**: `jsonschema-cli-aarch64-unknown-linux-gnu.tar.gz`
16+
- **macOS (Intel)**: `jsonschema-cli-x86_64-apple-darwin.tar.gz`
17+
- **macOS (Apple Silicon)**: `jsonschema-cli-aarch64-apple-darwin.tar.gz`
18+
- **Windows**: `jsonschema-cli-x86_64-pc-windows-msvc.zip`
19+
20+
Example installation on Linux/macOS:
21+
```bash
22+
# Download and extract (replace VERSION with actual version, e.g., cli-v0.36.0)
23+
curl -LO https://github.com/Stranger6667/jsonschema-rs/releases/download/VERSION/jsonschema-cli-x86_64-unknown-linux-gnu.tar.gz
24+
tar xzf jsonschema-cli-x86_64-unknown-linux-gnu.tar.gz
25+
26+
# Move to a directory in your PATH
27+
sudo mv jsonschema-cli /usr/local/bin/
1028
```
29+
30+
### From Source (requires Rust)
31+
32+
```bash
1133
cargo install jsonschema-cli
1234
```
1335

0 commit comments

Comments
 (0)