Files
obikmer/.gitea/workflows/release.yml
T
Eric Coissac a522c0907e
CI / build (push) Failing after 2m41s
CI / build (pull_request) Failing after 6s
feat: add CI/CD workflows, release automation, and CLI version flag
Adds Gitea Actions for continuous integration and tagged releases, including static musl binary compilation and artifact upload. Introduces a Makefile target to automate semantic version bumping and publishing. Bumps the package version to 0.1.1 and enables automatic `--version` output via Clap.
2026-06-22 10:36:40 +02:00

48 lines
1.2 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
jobs:
build-linux-static:
runs-on: ubuntu-latest
container: rust:latest
defaults:
run:
working-directory: src
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
src/target
key: linux-musl-cargo-${{ hashFiles('src/Cargo.lock') }}
restore-keys: linux-musl-cargo-
- name: Install musl toolchain
run: |
apt-get update -qq && apt-get install -y -qq musl-tools
rustup target add x86_64-unknown-linux-musl
- name: Build static binary
run: cargo build --release --target x86_64-unknown-linux-musl
- name: Prepare artifact
run: |
mkdir -p /tmp/dist
cp target/x86_64-unknown-linux-musl/release/obikmer /tmp/dist/obikmer-linux-x86_64
strip /tmp/dist/obikmer-linux-x86_64
- name: Upload release asset
uses: actions/upload-artifact@v4
with:
name: obikmer-linux-x86_64
path: /tmp/dist/obikmer-linux-x86_64
if-no-files-found: error