Skip to content

Commit

Permalink
feat: added binary releases
Browse files Browse the repository at this point in the history
  • Loading branch information
tedostrem committed Nov 6, 2024
1 parent 3f19c09 commit f28b659
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Release Binaries

on:
push:
tags:
- 'v*.*.*'

jobs:
build-release:
name: Build Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact_name: rustygate-linux-amd64
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
artifact_name: rustygate-linux-arm64
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: rustygate-darwin-amd64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: rustygate-darwin-arm64

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Build binary
run: |
cargo build --release --target ${{ matrix.target }}
cp target/${{ matrix.target }}/release/main ${{ matrix.artifact_name }}
- name: Generate SHA256
run: |
sha256sum ${{ matrix.artifact_name }} > ${{ matrix.artifact_name }}.sha256
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: |
${{ matrix.artifact_name }}
${{ matrix.artifact_name }}.sha256
create-release:
needs: build-release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
**/rustygate-*
generate_release_notes: true
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,51 @@ make dev
## License
This project is licensed under the MIT License.
## Installation
### Using Docker (recommended)
```bash
docker pull 3loc/rustygate
```
### Using Pre-built Binaries
Download the latest binary for your platform from the [releases page](https://github.com/3loc/rustygate/releases).
```bash
# Linux AMD64
curl -LO https://github.com/3loc/rustygate/releases/latest/download/rustygate-linux-amd64
chmod +x rustygate-linux-amd64
sudo mv rustygate-linux-amd64 /usr/local/bin/rustygate
# Linux ARM64 (e.g., Raspberry Pi)
curl -LO https://github.com/3loc/rustygate/releases/latest/download/rustygate-linux-arm64
chmod +x rustygate-linux-arm64
sudo mv rustygate-linux-arm64 /usr/local/bin/rustygate
# macOS AMD64 (Intel)
curl -LO https://github.com/3loc/rustygate/releases/latest/download/rustygate-darwin-amd64
chmod +x rustygate-darwin-amd64
sudo mv rustygate-darwin-amd64 /usr/local/bin/rustygate
# macOS ARM64 (Apple Silicon)
curl -LO https://github.com/3loc/rustygate/releases/latest/download/rustygate-darwin-arm64
chmod +x rustygate-darwin-arm64
sudo mv rustygate-darwin-arm64 /usr/local/bin/rustygate
```
To verify the binary (recommended):
```bash
# Download the checksum file
curl -LO https://github.com/3loc/rustygate/releases/latest/download/rustygate-<platform>.sha256
# Verify the checksum (replace <platform> with your platform)
sha256sum -c rustygate-<platform>.sha256
```
Available platforms:
- `linux-amd64`: Linux on Intel/AMD 64-bit
- `linux-arm64`: Linux on ARM64 (e.g., Raspberry Pi)
- `darwin-amd64`: macOS on Intel
- `darwin-arm64`: macOS on Apple Silicon

0 comments on commit f28b659

Please sign in to comment.