Add /version endpoint and GitHub Actions release workflow

This commit is contained in:
Ganonmaster
2026-03-18 13:42:40 +00:00
parent 33acab96a2
commit abc6cf1ecd
5 changed files with 119 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build-linux:
name: Build Linux release binary
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed so build.rs can run `git describe`
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu
- name: Cache Cargo registry and build artefacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build release binary
run: cargo build --release --target x86_64-unknown-linux-gnu
- name: Rename binary for upload
run: |
cp target/x86_64-unknown-linux-gnu/release/mikebase \
mikebase-${{ github.ref_name }}-x86_64-linux
- name: Upload binary to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: mikebase-${{ github.ref_name }}-x86_64-linux
generate_release_notes: true