evmlib 0.8.1

Safe Network EVM
Documentation
name: Release

on:
  workflow_dispatch:

permissions:
  contents: write

env:
  RUST_BACKTRACE: 1

jobs:
  build:
    name: Build
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable

      - uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

      - name: Run cargo build
        run: cargo build --release

  publish:
    name: Publish
    runs-on: ubuntu-latest
    needs: build
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: "0"
      - uses: dtolnay/rust-toolchain@stable

      - shell: bash
        run: |
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"

      - uses: cargo-bins/cargo-binstall@main
      - shell: bash
        run: cargo binstall --no-confirm release-plz

      - name: Publish crates
        shell: bash
        run: |
          cargo login "${{ secrets.CRATES_IO_TOKEN }}"
          release-plz release --git-token ${{ secrets.GITHUB_TOKEN }}