qrsync 0.3.0

Utility to copy files over WiFi to/from mobile devices inside a terminal using QR codes.
Documentation
name: release

on:
  push:
    # Sequence of patterns matched against refs/tags
    tags:
      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: 1

jobs:
  create-release:
    name: Create release
    runs-on: ubuntu-latest
    outputs:
      upload_url: ${{ steps.create-release.outputs.upload_url }}
    steps:
      - name: Create release
        id: create-release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}
          draft: false
          prerelease: false

  build-release:
    name: Build release
    needs: create-release
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        build:
          - linux glib amd64
          - linux glib arm7
          - linux glib arm64
          - macos x64
        include:
          - build: linux glib amd64
            os: ubuntu-latest
            rust: stable
            target: x86_64-unknown-linux-gnu
          - build: linux glib arm7
            os: ubuntu-latest
            rust: stable
            target: armv7-unknown-linux-gnueabihf
          - build: linux glib arm64
            os: ubuntu-latest
            rust: stable
            target: aarch64-unknown-linux-gnu
          - build: macos x64
            os: macos-latest
            rust: stable
            target: x86_64-apple-darwin

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ matrix.rust }}
          profile: minimal
          override: true
          target: ${{ matrix.target }}

      - name: Build release
        uses: actions-rs/cargo@v1
        with:
          use-cross: true
          command: build
          args: --target ${{ matrix.target }} --release

      - name: Tar release (unix)
        if: matrix.os != 'windows-2019'
        working-directory: ./target/${{ matrix.target }}/release
        run: tar cvfz qrsync-${{ matrix.target }}.tar.gz "qrsync"

      - name: Upload release archive (unix)
        if: matrix.os != 'windows-2019'
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ needs.create-release.outputs.upload_url }}
          asset_path: ./target/${{ matrix.target }}/release/qrsync-${{ matrix.target }}.tar.gz
          asset_name: qrsync-${{ matrix.target }}.tar.gz
          asset_content_type: application/octet-stream