ddcp 0.2.4

Distributed decentralized database-to-database copy
name: Release

on:
  push:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
        submodules: 'recursive'
        fetch-tags: 'true'
    - name: Install latest rust toolchain
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        default: true
        override: true
    - name: Install serde tooling
      run: |-
        bash -xe scripts/install_capnproto.sh
        bash -xe scripts/install_protoc.sh
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose

    - name: Install release tools
      run: cargo install cargo-release convco
    - name: Set up git committer
      run: |-
        git config --global user.email "ddcp-releaser@users.noreply.github.com"
        git config --global user.name "DDCP Release Github Action"
    - name: Release
      run: cargo release --execute --no-confirm $(convco version --bump)
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}