Skip to content

Release

Release #101

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
release_type:
description: "Release type (major, minor, patch)"
required: true
default: patch
type: choice
options:
- major
- minor
- patch
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
release:
timeout-minutes: 45
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
- name: Install dependencies on Ubuntu
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y uuid-dev
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Build and Test
run: |
# TODO need to work out why cargo build --release fails in CI
cargo build --workspace --verbose
cargo test --workspace -- --nocapture
- name: Install cargo-release
run: cargo install cargo-release cargo-edit
- name: Run cargo-release for specified version
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Mo Imran"
release_type="${{ github.event.inputs.release_type }}"
cargo release "$release_type" --workspace --execute --no-confirm --verbose --no-verify
- name: Push new version and tag to GitHub
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Check docker example builds
run: |
cd rusteron-docker-samples
docker build -t aeron-media-driver aeron-media-driver
docker build -t rusteron-dummy-example rusteron-dummy-example