pattrick 0.7.0

Pattrick is a command line tool for managing Personal Access Tokens (PAT) in Azure DevOps.
Documentation
name: Build release binaries

on:
  workflow_dispatch:
  push:
    tags:
      - "*"

env:
  CARGO_TERM_COLOR: always

jobs:
  release:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        target:
          [
            aarch64-unknown-linux-gnu,
            i686-unknown-linux-gnu,
            i686-unknown-linux-musl,
            x86_64-unknown-linux-gnu,
            x86_64-unknown-linux-musl,
          ]
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Install rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          override: true
          target: ${{ matrix.target }}

      - name: Build target
        uses: actions-rs/cargo@v1
        with:
          use-cross: true
          command: build
          args: --release --target ${{ matrix.target }}
      - name: Package
        shell: bash
        run: |
          cd target/${{ matrix.target }}/release          
          tar czvf ../../../pattrick-${{ matrix.target }}.tar.gz pattrick
          cd -
      - name: 'Get Previous tag'
        id: previoustag
        uses: "WyriHaximus/github-action-get-previous-tag@v1"
        with:
          fallback: 1.0.0 
      - name: Publish
        uses: softprops/action-gh-release@v1
        # TODO: if any of the build step fails, the release should be deleted.
        with:
            files: 'pattrick*'
            tag_name: ${{ steps.previoustag.outputs.tag }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
  release-mac:
    runs-on: macos-latest
    strategy:
      matrix:
        target: [aarch64-apple-darwin, x86_64-apple-darwin]
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Install rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          profile: minimal
          override: true
          target: ${{ matrix.target }}

      - name: Build target
        uses: actions-rs/cargo@v1
        with:
          use-cross: true
          command: build
          args: --release --target ${{ matrix.target }}
      - name: Package
        shell: bash
        run: |
          cd target/${{ matrix.target }}/release          
          tar czvf ../../../pattrick-${{ matrix.target }}.tar.gz pattrick
          cd -
      - name: 'Get Previous tag'
        id: previoustag
        uses: "WyriHaximus/github-action-get-previous-tag@v1"
        with:
          fallback: 1.0.0 
      - name: Publish
        uses: softprops/action-gh-release@v1
        # TODO: if any of the build step fails, the release should be deleted.
        with:
            files: 'pattrick*'
            tag_name: ${{ steps.previoustag.outputs.tag }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}