From 53d91e517594fd52193d816aa6f6119ce4660872 Mon Sep 17 00:00:00 2001 From: 9bany Date: Wed, 18 Mar 2026 10:32:02 +0700 Subject: [PATCH] release v1 --- .github/workflows/release.yml | 89 +++++++++++++++++++++++++++++++++++ readme.md | 27 ++++++++++- 2 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f813632 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/readme.md b/readme.md index ada97ed..9bf1963 100644 --- a/readme.md +++ b/readme.md @@ -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