docs: install guide and GitHub Actions release binaries
Some checks are pending
ci / test (push) Waiting to run
Some checks are pending
ci / test (push) Waiting to run
Add a README install path for CI-built Linux binaries (curl, checksum, PATH) plus source builds. CI runs tests/clippy on main; tags v*.*.* publish stripped x86_64 and aarch64 artifacts. --version/--help so a download can be checked without booting Tor.
This commit is contained in:
parent
5412e020bb
commit
b3f8307168
5 changed files with 304 additions and 5 deletions
29
.github/workflows/ci.yml
vendored
Normal file
29
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Test
|
||||
run: cargo test --locked
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --locked -- -D warnings
|
||||
92
.github/workflows/release.yml
vendored
Normal file
92
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.target }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-24.04
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: ubuntu-24.04-arm
|
||||
target: aarch64-unknown-linux-gnu
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: release-${{ matrix.target }}
|
||||
|
||||
- name: Build
|
||||
run: cargo build --release --locked --target ${{ matrix.target }}
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
set -euo pipefail
|
||||
bin="target/${{ matrix.target }}/release/onionwire"
|
||||
strip "$bin"
|
||||
asset="onionwire-${{ matrix.target }}"
|
||||
mkdir -p dist
|
||||
cp "$bin" "dist/${asset}"
|
||||
(cd dist && sha256sum "${asset}" > "${asset}.sha256")
|
||||
ls -l dist
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: onionwire-${{ matrix.target }}
|
||||
path: dist/*
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
|
||||
- name: Checksums
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cd dist
|
||||
ls -l
|
||||
cat *.sha256
|
||||
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/*
|
||||
generate_release_notes: true
|
||||
fail_on_unmatched_files: true
|
||||
body: |
|
||||
Prebuilt Linux binaries. No `tor` package required.
|
||||
|
||||
```bash
|
||||
# x86_64
|
||||
curl -fL -o onionwire \
|
||||
https://github.com/sirius0xdev/onionwire/releases/download/${{ github.ref_name }}/onionwire-x86_64-unknown-linux-gnu
|
||||
chmod +x onionwire
|
||||
./onionwire --version
|
||||
./onionwire
|
||||
```
|
||||
|
||||
See the README install guide for aarch64, checksums, and building from source.
|
||||
Loading…
Reference in a new issue