car-utils 0.2.0

This crate is the ipfs car file reader writer and utils.
on:
  release:
    types: [created]
  workflow_dispatch:

name: Car Utils Release Linux
jobs:
  car_utils:
    strategy:
      matrix:
        include:
          - build: linux
            os: linux-latest
            rust: stable
            runson: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            arch: x86_64
            cross: false
          - build: linux_arm64
            os: linux-latest
            runson: self-hosted
            rust: stable
            target: aarch64-unknown-linux-gnu
            arch: aarch64
            cross: true
    runs-on: ${{ matrix.runson }}
    steps:
      - uses: actions/checkout@v2
      - name: create Cross.toml
        run: |
          echo [target.aarch64-unknown-linux-gnu] >> Cross.toml
          echo "dockerfile = \"./Dockerfile\"" >> Cross.toml
      - name: create Dockerfile
        run: |
          echo "FROM arm64v8/rust" > Dockerfile
          echo "RUN dpkg --add-architecture arm64 && \\" >> Dockerfile
          echo "apt-get update && \\" >> Dockerfile
          echo "apt-get install --assume-yes build-essential" >> Dockerfile
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: 1.64.0
      - name: Build runtime
        uses: actions-rs/cargo@v1
        with:
          use-cross: ${{ matrix.cross }}
          command: build
          args: --release --all-features --target ${{ matrix.target }}
      - name: Remove File
        uses: JesseTG/rm@v1.0.3
        with:
          path: target/${{ matrix.target }}/release/.fingerprint
      - name: Remove File
        uses: JesseTG/rm@v1.0.3
        with:
          path: target/${{ matrix.target }}/release/examples
      - name: Remove File
        uses: JesseTG/rm@v1.0.3
        with:
          path: ttarget/${{ matrix.target }}/release/build
      - name: Remove File
        uses: JesseTG/rm@v1.0.3
        with:
          path: target/${{ matrix.target }}/release/incremental
      - name: Remove File
        uses: JesseTG/rm@v1.0.3
        with:
          path: target/${{ matrix.target }}/release/examples
      - name: Remove File
        uses: JesseTG/rm@v1.0.3
        with:
          path: target/${{ matrix.target }}/release/deps
      - name: Archive Release
        uses: thedoctor0/zip-release@main
        with:
          type: "tar"
          filename: ../../../car-utils.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
          directory: target/${{ matrix.target }}/release
          path: .
      - name: Get release
        id: get_release
        uses: bruceadams/get-release@v1.3.2
        env:
          GITHUB_TOKEN: ${{ github.token }}
      - name: upload artifact
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ github.token }}
        with:
          upload_url: ${{ steps.get_release.outputs.upload_url }}
          asset_path: car-utils.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
          asset_name: car-utils.${{ matrix.os }}.${{ matrix.arch }}.tar.gz
          asset_content_type: application/gzips