Skip to content

Commit b6b4b81

Browse files
committed
binstall for vortex-tui
Signed-off-by: Andrew Duffy <andrew@a10y.dev>
1 parent 3e6834e commit b6b4b81

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release Binaries
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Build ${{ matrix.target }}
10+
runs-on: ${{ matrix.runs-on }}
11+
timeout-minutes: 120
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- target: aarch64-apple-darwin
17+
runs-on: macos-latest
18+
archive: tgz
19+
- target: x86_64-apple-darwin
20+
runs-on: macos-15-intel
21+
archive: tgz
22+
- target: aarch64-unknown-linux-gnu
23+
runs-on: ubuntu-24.04-arm
24+
archive: tgz
25+
- target: x86_64-unknown-linux-gnu
26+
runs-on: ubuntu-24.04
27+
archive: tgz
28+
steps:
29+
- uses: actions/checkout@v6
30+
with:
31+
fetch-depth: 0
32+
33+
- uses: ./.github/actions/setup-rust
34+
with:
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
targets: ${{ matrix.target }}
37+
enable-sccache: "false"
38+
39+
- name: Build release binary
40+
run: cargo build --release --package vortex-tui --bin vx --target ${{ matrix.target }}
41+
42+
- name: Create archive (tgz)
43+
if: matrix.archive == 'tgz'
44+
run: |
45+
cd target/${{ matrix.target }}/release
46+
tar -czvf ../../../vx-${{ matrix.target }}.tar.gz vx
47+
48+
- name: Create archive (zip)
49+
if: matrix.archive == 'zip'
50+
run: |
51+
cd target/${{ matrix.target }}/release
52+
zip ../../../vx-${{ matrix.target }}.zip vx.exe
53+
54+
- name: Upload release asset
55+
uses: softprops/action-gh-release@v2
56+
with:
57+
files: vx-${{ matrix.target }}.${{ matrix.archive == 'tgz' && 'tar.gz' || 'zip' }}
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

vortex-tui/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,13 @@ web-sys = { version = "0.3.81", features = [
9090
"Window",
9191
] }
9292

93+
[package.metadata.binstall]
94+
pkg-url = "{ repo }/releases/download/{ version }/vx-{ target }{ archive-suffix }"
95+
bin-dir = "{ bin }{ binary-ext }"
96+
pkg-fmt = "tgz"
97+
98+
[package.metadata.binstall.overrides.'cfg(target_os = "windows")']
99+
pkg-fmt = "zip"
100+
93101
[lints]
94102
workspace = true

0 commit comments

Comments
 (0)