d1755fd481
Co-authored-by: Ganonmaster <168445+Ganonmaster@users.noreply.github.com>
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
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
|