derive-rs 0.1.16

Rust SDK for Derive.xyz
#  Workflow to perform a release on merge into main branch
# pushes a new tag and creates a GitHub release

name: Release
on:
  push:
    branches:
      - master

# set permissions for the workflow
permissions:
  contents: write
  packages: write
  id-token: write


jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
      - name: Configure git identity
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"
      - name: Cache cargo
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-

      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@v1
        with:
          toolchain: 1.94.1
          components: rustfmt, clippy
      - uses: rust-lang/crates-io-auth-action@v1
        id: auth
      - run: cargo publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

      - name: Create Release
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          make release