Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Release

on:
push:
tags:
- 'v*'

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact: gamm-linux-x86_64
- os: macos-latest
target: x86_64-apple-darwin
artifact: gamm-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact: gamm-macos-aarch64
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact: gamm-windows-x86_64.exe

steps:
- uses: actions/checkout@v4

- name: Install Rust target
run: rustup target add ${{ matrix.target }}

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}

- name: Test binary (Unix)
if: matrix.os != 'windows-latest'
run: |
BIN=target/${{ matrix.target }}/release/gamm
$BIN version
$BIN --help
$BIN repo list
$BIN profile list

- name: Test binary (Windows)
if: matrix.os == 'windows-latest'
run: |
$BIN = "target\${{ matrix.target }}\release\gamm.exe"
& $BIN version
& $BIN --help
& $BIN repo list
& $BIN profile list

- name: Rename binary (Unix)
if: matrix.os != 'windows-latest'
run: cp target/${{ matrix.target }}/release/gamm ${{ matrix.artifact }}

- name: Rename binary (Windows)
if: matrix.os == 'windows-latest'
run: cp target/${{ matrix.target }}/release/gamm.exe ${{ matrix.artifact }}

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}

release:
name: Create Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
generate_release_notes: true
27 changes: 26 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,32 @@ Options:
-h, --help Print help
```

## Install
## Install

### macOS / Linux

```bash
# macOS (Apple Silicon)
curl -L https://github.com/raftio/gamm/releases/latest/download/gamm-macos-aarch64 -o /usr/local/bin/gamm

# macOS (Intel)
curl -L https://github.com/raftio/gamm/releases/latest/download/gamm-macos-x86_64 -o /usr/local/bin/gamm

# Linux (x86_64)
curl -L https://github.com/raftio/gamm/releases/latest/download/gamm-linux-x86_64 -o /usr/local/bin/gamm
```

Then make it executable:

```bash
chmod +x /usr/local/bin/gamm
```

### Windows

Download `gamm-windows-x86_64.exe` from the [latest release](https://github.com/raftio/gamm/releases/latest), rename it to `gamm.exe`, and place it somewhere in your `PATH`.

### Build from source

```bash
cargo install --git https://github.com/raftio/gamm.git
Expand Down
Loading