dcl-crypto 0.2.2

Tools to create and validate Decentraland's Authentication Chains.
Documentation
name: Build

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
    types:
      - opened
      - synchronize

jobs:

  release:
    runs-on: ubuntu-20.04

    steps:
      - uses: actions/checkout@v3

      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable

      - name: Clippy (lint)
        uses: actions-rs/clippy-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --all-features

      - name: Set up cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: ${{ runner.os }}-cargo-

      - name: cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --doc
        env:
          ETHEREUM_MAINNET_RPC: ${{ secrets.ETHEREUM_MAINNET_RPC }}

      - name: cargo build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --release --all-features

      - name: cargo doc (only on main branch)
        uses: actions-rs/cargo@v1
        if: ${{ github.ref == 'refs/heads/main' }}
        with:
          command: doc
          args: --no-deps

      - name: publishing documents  (only on main branch)
        if: ${{ github.ref == 'refs/heads/main' }}
        uses: peaceiris/actions-gh-pages@v3
        with:
          publish_branch: gh-pages
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./target/doc